CN102426522A - CPS (Cyber Physical Systems) modeling and verification method based on transformation from hybrid UML (Unified Modeling Language) to DAP (Differential-Algebraic Program) - Google Patents
CPS (Cyber Physical Systems) modeling and verification method based on transformation from hybrid UML (Unified Modeling Language) to DAP (Differential-Algebraic Program) Download PDFInfo
- Publication number
- CN102426522A CN102426522A CN2011103380920A CN201110338092A CN102426522A CN 102426522 A CN102426522 A CN 102426522A CN 2011103380920 A CN2011103380920 A CN 2011103380920A CN 201110338092 A CN201110338092 A CN 201110338092A CN 102426522 A CN102426522 A CN 102426522A
- Authority
- CN
- China
- Prior art keywords
- transition
- hybriduml
- agent
- continuous
- mode
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a CPS (Cyber Physical Systems) modeling and verification method based on transformation from a hybrid UML (Unified Modeling Language) to a DAP (Differential-Algebraic Program), in which transformation from the hybrid UML to the DLP is realized, and a CPS embodiment is verified according to a DAL (Differential-Algebraic Dynamic Logic) inference rule. In the method, the Hybrid UML is used for CPS modeling, the Hybrid UML is transformed into an operating model DAP of the DAL, and the CPS attribute is verified based on the DAL.
Description
Technical field
The present invention is a kind of based on CPS modeling and the verification method changed to the differential algebra program by HybridUML; This method can utilize HybridUML that CPS is carried out modeling very easily; Is the differential algebra program according to transformation rule with the HybridUML model conversion, and utilizes the differential algebra dynamic logic that system property is described with reasoning and verify.
Background technology
Generally because CPS shows as the discrete control of system and the continuous variation of physical system, cause for the modeling of CPS and checking and difficulty.The mixing automat can be used for the CPS system is carried out modeling, and according to existing state automata verification technique, can be used for CPS is verified as the modeling language with the discrete transition of portrayal simultaneously and continuous variation characteristic.But, adopt the mixing automat in the CPS proof procedure, the state explosion problem can occur usually because CPS is a kind of complication system that has combined software and hardware and physical environment.The mixing petri net of tape label can be used for to CPS system modelling and checking, and for the state explosion problem in the proof procedure, exists automatic extractive technique to come in the extraction model own interested part with simplified model.
HybridUML is had the ability of describing discrete transition and continuous variation characteristic simultaneously, and is provided graphical element to be used for system modelling by the UML expansion, can easily carry out modeling to system intuitively.But it is unfavorable for carrying out the formalization checking.The differential algebra dynamic logic can be portrayed discrete transition and continually varying ability simultaneously, has very strong logical reasoning ability, owing to the process of verifying is got by reasoning from logic, thereby has avoided the problem of state explosion in the proof procedure.But the operation model differential algebra program of differential algebra dynamic logic has been brought very big difficulty too in abstract to modeling.
This method provides by the rule of HybridUML model to the conversion of differential algebra program; Can use HybridUML that the CPS system is carried out modeling through this method; Can very easily the HybridUML model conversion be become the differential algebra program then, always can describe system property and the reasoning checking through the differential algebra dynamic logic.
Summary of the invention
The present invention expands the HybridUML formalized description; And formulated by the rule of HybridUML model to differential algebra program DAP conversion; Use HybridUML that system is carried out modeling and then converts the differential algebra program into, utilize the differential algebra dynamic logic that system property is described with reasoning and verify.
Technical matters: the present invention proposes a kind of by the HybridUML model to differential algebra program (Differential-Algebraic Program; DAP) method of conversion; Realized by of the conversion of HybridUML model to DAP; And according to the differential algebra dynamic logic (Differential-Algebraic Dynamic Logic, DAL) inference rule is verified the CPS instance.
Technical scheme: the present invention is through formulating the rule of HybridUML model to the conversion of differential algebra program; Making to utilize the graphical element of HybridUML easily to carry out modeling to CPS intuitively; And is the differential algebra program according to transformation rule with the HybridUML model conversion, and then can utilize the differential algebra dynamic logic that system property is described with reasoning and verify.
A kind of based on CPS modeling and the verification method of HybridUML to the conversion of differential algebra program, comprise the steps:
Step 1) defines according to existing HybridUML formalized description, and the HybridUML formalized description is expanded, and provides polynary group of the formalized description of agent and mode;
Step 2) the graphical element that utilizes HybridUML to provide carries out modeling to the CPS system; HybridUML portrays the behavior of system through the structure of agent descriptive system through mode;
Step 3) is according to the definition of polynary group of the formalized description of agent that proposes and mode, provides polynary group the formalized description of each agent and mode in the graphical model of being built;
Step 4) is formulated discrete transition semanteme semantic transformation rule of discrete transition in the differential algebra program among the HybridUML, formulates to change the semantic semantic transformation rule that in the differential algebra program, changes continuously among the HybridUML continuously:
1. the semantic conversion of discrete transition:
Transition among the HybridUML by five-tuple form t=(src, tar, trigger, guard, action)
Src and tar are respectively the reference mark of the source mode and the target mode of transition;
Trigger is the trigger of transition;
Guard is the condition of transition migration;
Action is the action (discrete valuation of variable or generation signal) that transition produce.
Is transition tabel in the differential algebra program shown? State=m
Src∧ guard; Action; State:=m
Tar
Discrete transition among the HybridUML can convert the discrete transition in the differential algebra program to through following rule:
2. change semantic conversion continuously:
HybridUML is through flow, and alge and inv retrain the continuous behavior of agent.
The differential algebra program retrains the continuous behavior of portraying through differential algebra.The continuous behavior of differential algebra program is expressed as state=m ∧ DA-constraints
Flow, alge∧ DA-constraints
Inv, system is in the state m variations per hour of the continuous behavior of generation with DA-constraints
Flow, algeConstraint condition change continuously, and in this continually varying process, must satisfy in this change procedure the invariant constraint DA-constraints that should keep
Inv
Continuous dynamic behaviour among the HybridUML can convert DAP to through following rule:
Step 5) is formulated the algorithm of seeking shared variable in the HybridUML model:
Seek out shared variable set all in the model; What be among the HybridUML that variable that same shared variable concentrates portrays in total system is same variable; Be that variable in the same shared set is same variable; For variable identical in the system is unified variable name, formulate and seek the algorithm of sharing signal in the HybridUML model, seek the shared variable set in the model;
All agent continuous variation of section is sometime portrayed total system jointly in this continuous variation of section constantly among the step 6) HybridUML; According to the continuous variation semantic conversion rule in the step 4), formulate the continuous variation of system system's continually varying transformation rule in the differential algebra program from the HybridUML model; All set that TopMode formed are { tm among the note HybridUML
1, tm
2Tm
n, a certain continuous dynamic behaviour state of system representation can convert following DAP among the HybridUML, wherein
Expression tm
iIn the mode that is possessed of control power:
Discrete transition in the step 7) HybridUML system among some agent may trigger another transition; And maybe be through the discrete transition among shared variable and another agent of shared signal triggering; Formulate algorithm, obtain because of the caused a series of continuous discrete transition of some discrete transition, according to the discrete transition semantic conversion rule in the step 4); The transformation rule of the discrete transition of formulation system from the HybridUML model discrete transition of system in the differential algebra program; Basic ideas are that the behavior through initial transition obtains other transition by this transition generation that behavior causes, and then seek the transition that caused generation by the behavior of the transition that taken place, repeat this process; Up to the generation that does not cause new transition, so just obtained because of the caused a series of continuous discrete transition of some discrete transition;
Step 8) is based on the transformation rule that proposes in step 6) and the step 7); Process according to system's execution; With the HybridUML model conversion of system is the DAP model; System in commission can experience discrete transition of row and continually varying process; In this process; Convert the discrete transition among the HybridUML in the differential algebra program discrete transition according to the rule in the step 6), convert the continuous variation among the HybridUML in the differential algebra program continuous variation according to the rule in the step 7);
Step 9) uses the differential algebra dynamic logic that the system property of needs checking is described, and uses the inference rule of differential algebra dynamic logic that attribute is carried out the reasoning checking;
The step 10) checking finishes.
Beneficial effect: prove that through instance analysis the present invention has accomplished by the conversion of HybridUML model to the differential algebra program.Use HybridUML can be very easily the CPS system of complicacy to be carried out modeling, and realize of the conversion of HybridUML model, utilize the differential algebra dynamic logic system property is described and to be verified to the differential algebra program through transformation rule.The invention enables CPS is become easily convenient from modeling to the process of verifying.
Description of drawings
Fig. 1 is the structure of system
Fig. 2 is the structure of aircraft
Fig. 3 is Agent flightcontrol definition
Fig. 4 is the behavior of flghtcontrol
Fig. 5 is agent manoeuvre definition
Fig. 6 is the behavior of manoeuvre
Fig. 7 is a schematic flow sheet of the present invention
Embodiment
Below in conjunction with accompanying drawing and embodiment the present technique scheme is further specified as follows:
Step 1). according to existing HybridUML formalized description definition; The HybridUML formalized description is expanded; Provide polynary group of the formalized description of Agent and Mode; Make that system model all is to portray with agent and mode, the structure of agent portrayal system, the behavior of mode portrayal system.According to whether comprising other agent, agent is divided into compositeagent that comprises other agent and the basicagent that does not comprise other agent; According to whether comprising other mode, mode is divided into nestmode that comprises other mode and the leafmode that does not comprise other mode.
Polynary group of agent and mode formalized description are as follows:
agent=basicagent||compositeagent
basicagent=(VAR,PARAM,SIG,VAR_PORT,SIG_PORT,TopMode)
compositeagent=(VAR,PARAM,SIG,VAR_PORT,SIG_PORT,VAR_CONN,SIG_CONN,subAgent_INST)
VAR is the set of all variablees among the agent; PARAM is the set that all parameters are formed among the agent; SIG is the set of all signals among the agent; VAR_PORT is the set that all variable ports are formed among the agent, and wherein the pairing variable of all variable ports must belong to the VAR of this agent; SIG_PORT is the set that all signal ports are formed among the agent, and wherein the pairing signal of all signal ports must belong to the SIG of this agent.
TopMode is the behavior of basicagent, is made up of a tlv triple: Mode is the mode that basicagent directly comprised; Initiai_trans is the initial transition of Mode, i.e. the initial behavior of basicagent; Current_state has write down the mode that is possessed of control power under this Mode.TopMode has described the behavior of agent, only is present among the basicagent.
TopMode=(Mode,initial_trans?current_state)
VAR_CONN is the set of all variable port connectors among the compositeagent; SIG_CONN is the set of all signal port connectors among the compositeagent.SubAgent_INST is the set that all agent instances of comprising among the agent are formed.
mode=leafmode||nestmode
leafmode=(CONTROLP,flow,alge,inv)
nestmode=(CONTROLP,flow,alge,inv,TRANS,subM_INST)
CONTROLP is the set that all reference mark are formed among the mode.Flow, variable continually varying constraint among the alge portrayal mode; Inv be mode be in active state the constraint that must satisfy; TRANS is the set of all transition among the nestmode; SubM_INST is the set that the sub-mode instances of all that comprise among the nestmode are formed.
Step 2). the graphical element that utilizes HybridUML to provide carries out modeling to the CPS system.
Step 3). according to the definition of polynary group of the formalized description of the Agent that provides and Mode, provide polynary group the formalized description of each agent and mode in the graphical model of being built.
Step 4). formulate discrete transition semanteme semantic transformation rule of discrete transition in DAP among the HybridUML, realize discrete transition semanteme semantic conversion of discrete transition in DAP among the HybridUML.Formulate the continuous semanteme continuous transformation rule that changes semanteme in DAP that changes among the HybridUML, realize the semantic continuous conversion that changes semanteme in DAP of continuous variation among the HybridUML,
1. the semantic conversion of discrete transition:
Transition among the HybridUML by five-tuple form t=(src, tar, trigger, guard, action), src and tar are respectively the reference mark of the source mode and the target mode of transition; Trigger is the trigger of transition, and all triggerings all are signal triggering (when there is not trigger in transition, being regarded as always being triggered) in HybridUML; Guard is the condition of transition migration; Action is the action (discrete valuation of variable or generation signal) that transition produce.
Transition in the differential algebra program? State=m
Src∧ guard; Action; State:=m
TarWherein? Expression judges that state is a state variable, the residing state of expression system; Guard is the transition condition of current transition; When system is in this state and transition condition and satisfies simultaneously, the action of transition will take place, and state variable is in the state after system's transition.
Discrete transition among the HybridUML can convert DAP to through following rule:
2. change semantic conversion continuously:
Flow among the leafmode, the flow among the ancestors mode of alge and inv constraint and leafmode, alge and inv retrain portray jointly agent be in this leafmode variations per hour change continuously the constraint that should satisfy, i.e. the continuous behavior of agent.The wherein continuous variation of flow and alge bound variable, inv provide be in this mode the invariant constraint that should satisfy.
Retrain the continuous behavior of portraying through a series of differential algebra in the differential algebra program.Continuous behavior state=m ∧ DA-constraints among the DAP
Flow, alge∧ DA-constraints
Inv, system is in the state m variations per hour of the continuous behavior of generation with DA-constraints
Flow, algeConstraint condition change continuously, and in this continually varying process, must satisfy in this change procedure the invariant constraint DA-constraints that should keep
Inv
Continuous dynamic behaviour among the HybridUML can convert DAP to through following rule:
Step 5). formulate the algorithm of seeking shared variable in the HybridUMML model; Seek out the set of shared variable all in the model, what be among the HybridUML that variable that same shared variable concentrates portrays in total system is same variable, and the variable in the promptly same shared set is same variable; For variable identical in the system is unified variable name; Formulate and seek the algorithm of sharing signal in the HybridUML model, seek the shared variable set in the model
Can obtain the set that all shared variable sets of system are formed through algorithm 1:
Change the importation in the above-mentioned algorithm in the system signaling interface collection C
S, just obtain sharing in the system signal set SetS.
All agent continuous variation of section is sometime portrayed total system jointly in this continuous variation of section constantly among the step 6) .HybridUML; According to the continuous variation semantic conversion rule in the step 4), formulate the continuous variation of system system's continually varying transformation rule in the differential algebra program from the HybridUML model.
All set that TopMode formed are { tm among the note HybridUML
1, tm
2Tm
n, a certain continuous dynamic behaviour state of system representation can convert following DAP among the HybridUML, wherein
Expression tm
iIn the mode that is possessed of control power:
Discrete transition in the step 7) .HybridUML system among some agent may trigger another transition; And maybe be through the discrete transition among shared variable and another agent of shared signal triggering; Formulate algorithm, obtain because of the caused a series of continuous discrete transition of some discrete transition, according to the discrete transition semantic conversion rule in the step 4); The transformation rule of the discrete transition of formulation system from the HybridUML model discrete transition of system in the differential algebra program
The continuous transition formation that algorithm 2 obtains the initial transition set from a continuous dynamic behaviour state to the continuous dynamic behaviour state of the next one and produced by this initial transition set.
If with Q
2In transition be designated as t successively according to its order of in formation, arranging
1, t
2T
p(1≤p≤| T|), wherein | T| is the transition number among the transition collection T of system.S
1In stored in these a series of continuous transition beginning most simultaneous transition, be designated as t
1, t
2T
q(1≤q≤p).Therefore the condition of these a series of continuous transition generations should be S
1In the transition condition of all transition all satisfy.The set of supposing all TopMode of total system is { tm
1, tm
2Tm
n, then reach the continuous transition that next behavior state continuously taken place and can convert following DAP into from a certain continuous behavior state:
Step 8). according to the transformation rule that proposes in step 7) and the step 8), the process of carrying out according to system is the DAP model with the HybridUML model conversion of system,
Step 9). use the differential algebra dynamic logic that the system property of needs checking is described, and use the inference rule of differential algebra dynamic logic that attribute is carried out the reasoning checking,
Step 10). checking finishes.
In order to explain that the present invention says the method that provides, be this method of example shows with the aircraft anti-collision system, being described below of aircraft anti-collision system:
Anti-collision system in the aviation flight is a very typical C PS application; We are research object with the aircraft anti-collision system; Use HybridUML that system is carried out modeling, and convert thereof into DAP, collision avoidance process safe property is described and verifies based on DAL.
Be example with a horizontal anti-collision system here, for the convenience of explaining, suppose the flight of two airplanes on same surface level, the position of two airplanes is respectively x=(x
1, x
2) and y=(y
1, y
2), speed is respectively d=(d
1, d
2) and e=(e
1, e
2), acceleration be respectively ω with
Suppose that two airplanes will bump against certain 1 c, i.e. x+ λ d=y+ λ e in a certain moment.The process prescription of system's collision avoidance is following:
At first, aircraft will be in the free stage of free flight; When there is risk of collision in two aircrafts, will confirms a some c in agree stages two aircraft anti-collision system, and be that the center of circle confirms that two radiuses are respectively r with c
1And r
2Two concentric circles collision avoidance tracks and the angular velocity omega of confirming a forward, and guarantee (r
1ω)
2=d
2∧ (r
2ω)
2=e
2, suppose that here two aircrafts confirm the not free passage of process of parameter; Next be the entry stage, two airplanes will get into the entry stage simultaneously, and with the level and smooth entering collision avoidance track separately of angular velocity of-ω; In the circ stage, two airplanes are with the spiraling on two circles of concentric respectively of common angular velocity omega; The exit stage, two airplanes with the angular velocity of-ω level and smooth leave collision avoidance, before getting back to, making ω the course line time is 0, aircraft continues to move ahead.Getting into the condition in each stage and the description condition in each stage will provide in the model of being built.
Polynary group of step 1) .agent and mode formalized description are as follows:
agent=basicagent||compositeagent
basicagent=(VAR,PARAM,SIG,VAR_PORT,SIG_PORT,TopMode)
compositeagent=(VAR,PARAM,SIG,VAR_PORT,SIG_PORT,VAR_CONN,SIG_CONN,subAgent_INST)
VAR is the set of all variablees among the agent; PARAM is the set that all parameters are formed among the agent; SIG is the set of all signals among the agent; VAR_PORT is the set that all variable ports are formed among the agent, and wherein the pairing variable of all variable ports must belong to the VAR of this agent; SIG_PORT is the set that all signal ports are formed among the agent, and wherein the pairing signal of all signal ports must belong to the SIG of this agent.
TopMode is the behavior of basicagent, is made up of a tlv triple: Mode is the mode that basicagent directly comprised; Initial_trans is the initial transition of Mode, i.e. the initial behavior of basicagent; Current_state has write down the mode that is possessed of control power under this Mode.TopMode has described the behavior of agent, only is present among the basicagent.
TopMode=(Mode,initial_trans,current_state)
VAR_CONN is the set of all variable port connectors among the compositeagent; SIG_CONN is the set of all signal port connectors among the compositeagent.SubAgent_INST is the set that all agent instances of comprising among the agent are formed.
mode=leafmode||nestmode
leafmode=(CONTROLP,flow,alge,inv)
nestmode=(CONTROLP,flow,alge,inv,TRANS,subM_INST)
CONTROLP is the set that all reference mark are formed among the mode.Flow, variable continually varying constraint among the alge portrayal mode; Inv be mode be in active state the constraint that must satisfy; TRANS is the set of all transition among the nestmode; SubM_INST is the set that the sub-mode instances of all that comprise among the nestmode are formed.
Step 2). the graphical element that utilizes HybridUML to provide carries out modeling to the CPS system,
Below I use HybridUML to system modelling, provided main system model.The agent instance that is in top layer is the instance of agent system, and agent system is a compositeagent, and its structure is as shown in Figure 1, comprises two agent aircraft instance A1 and A2.Agent aircraft is the aircraft of collision avoidance in the system, two airplanes of collision avoidance, and we are called an airplane intruder of another airplane.Agent aircraft also is a compositeagent, and its structure is as shown in Figure 2, comprises an agent flightcontrol instance and an agent manoeuvre instance.Wherein, flightcontrol is the dynamic control system of aircraft flight, and manoeuvre is the aircraft anti-collision system, and the strategy of aircraft collision avoidance is provided.
The definition of agent flightcontrol is as shown in Figure 3, and flightcontrol is a basicagent, and it comprises the mode that describes its behavior one by one.Mode among the flightcontrol is flightBehavior, and its behavior description is as shown in Figure 4, wherein F (ω
c) ≡ x
1'=v
1∧ x
2'=v
2∧ v
1The ω of '=-
cv
2∧ v
2'=ω
cv
1The definition of agent manoeuvre is as shown in Figure 5, and manoeuvre also is a basicagent, and it comprises the mode that describes its behavior one by one.Mode among the manoeuvre is manoeuvreBehavior, and its behavior description is as shown in Figure 6.
Step 3). according to the definition of polynary group of the formalized description of the Agent that provides and Mode, provide polynary group the formalized description of each agent and mode in the graphical model of being built,
With regard to how provide the problem of polynary group the formalized description of agent and mode below, provided sample according to graphical model.
For example, agent aircraft instance A1 is described as
A1=(VAR,PARAM,SIG,VAR_PORT,SIG_PORT,VAR_CONN,SIG_CONN,subAgent_INST)
Wherein: VAR={A1.w, A1.v, A1.x, A1.c, A1.invadeX, A1.invadeV}; PARAM=NULL; SIG=NULL; VAR_PORT={A1.w_p, A1.v_p, A1.x_p, A1.c_p, A1.invadeX_p, A1.invadeV_p}; SIG_PORT=NULL;
SubAgent_INST={A1.F, A1.M} (A1.F and A1.M are respectively agent flightcontrol and the instance of agent manoeuvre among the A1);
VAR_CONN={(A1.w_p,A1.F.w_p,A1.M.w_p),
(A1.v_p,A1.F.v_p,A1.M.v_p),
(A1.x_p,A1.F.x_p,A1.M.x_p),
(A1.c_p,A1.M.c_p),
(A1.invadeX_p,A1.M.invadeX_p),
(A1.invadeX_p,A1.M.invadeX_p)};
SIG_CONN={(A1.M.sendfree()_p,A1.F.free()_p),
(A1.M.sendinvade()_p,A1.F.invade()_p),
(A1.M.Wchanged()_p,A1.F.Wchanged()_p)}
The agent flightcontrol instance A1.F that comprises among the A1 is described as
basicagent=(VAR,PARAM,SIG,VAR_PORT,SIG_PORT,TopMode)
Wherein: VAR={A1.F.v, A1.F.x, A1.F.w, A1.F.wc}; PARAM=NULL;
SIG={A1.F.free(),A1.F.invade(),A1.F.Wchanged()};
VAR_PORT={A1.F.v_p,A1.F.x_p,A1.F.w_p};
SIG_PORT={A1.F.free()_p,A1.F.invade()_p,A1.F.Wchanged()_p};
TopMode=(A1.flightBehavior,initial_trans,current_state)
The mode flightBehavior instance A1.flightBehavior that comprises among the A1.F is described as:
A1.flightBehavior=(CONTROLP,flow,alge,inv,TRANS,subM_INST)
Wherein: CONTROLP=NULL; Flow={F (wc) }; Alge=NULL; Inv=NULL; SubM_INST={A1.freeflight, A1.avoidancefilght} (A1.freeflight and A1.avoidancefilght are respectively the instances of mode freeflight and mode avoidancefilght);
TRANS={A1.flightBehavior.t_02f=(NULL,A1.freeflight.entry,init(),NULL,A1.Fwc:=*),A1.flightBehavior.t_f2f=(A1.freeflight.exit,A1.freeflight.entry,user(),NULL,A1.F.wc:=*),A1.flightBehavior.t_f2a=(A1.freeflight.exit,A1.avoidancefilght.entry,invade(),NULL,A1.F.wc:=w),A1.flightBehavior.t_a2f=(A1.avoidancefilght.exit,A1.freeflight.entry,A1.F.free(),NULL,A1.F.wc:=*),A1.flightBehavior.t_a2f=(A1.avoidancefilght.exit,A1.avoidancefilght.entry,A1.F.Wchanged(),NULL,A1.F.wc:=w)}
The mode freeflight instance A1.freeflgiht that comprises among the A1.flightBehavior is described as:
A1.freeflight=(CONTROLP,flow,alge,inv)
Wherein: CONTROLP={A1.freeflight.entry, A1.freeflight.exit}flow=NULL; Alge=NULL; Inv=NULL
Step 4). the transition semanteme semantic transformation rule of discrete transition in the differential algebra program that disperses among the formulation HybridUML, formulate the semantic transformation rule that in the differential algebra program, changes semanteme continuously of continuous variation among the HybridUML.
Discrete transition among the HybridUML can convert DAP to through following rule:
Continuous dynamic behaviour among the HybridUML can convert DAP to through following rule:
Step 5). formulate the algorithm of seeking shared variable in the HybridUMML model; Seek out shared variable set all in the model; What be among the HybridUML that variable that same shared variable concentrates portrays in total system is same variable, and the variable in the promptly same shared set is same variable, for variable identical in the system is unified variable name; Formulate and seek the algorithm of sharing signal in the HybridUML model, seek the shared variable set in the model.
Provide below through algorithm 1 and obtained shared variable set SetV, and for same variables set with in variable unified variable name, and provided the meaning of variable name:
X, the position of y:A1 and A2; D, the speed of e:A1 and A2; C, w: the common center of circle and the angular velocity confirmed during collision avoidance; R1, determined radius when r2:A1 and A2 collision avoidance; Wc1, the angular velocity of wc2:A1 and A2 flight; X0, y0:A1 and A2 get into the position of entry before the stage; D0, e0:A1 and A2 get into the speed of entry before the stage, the time variable t of system.
SetV={{A1.x,A2.invadeX,A1.F.x,A1.M.x,A2.M.invadeX}->x,
{A1.v,A2.invadeV,A1.F.v,A1.M.v,A2.M.invadeV}->d,
{A2.x,A1.invadeX,A2.F.x,A2.M.x,A1.M.invadeX}->y,
{A2.v,A1.invadeV,A2.F.v,A2.M.v,A1.M.invadeV}->e,
{A1.w,A2.w,A1.F.w,A1.M.w,A2.F.w,A2.M.w}->w,
{A1.c,A2.c,A2.F.c,A2.M.c}->c,{A1.M.r}->r1,
{A2.M.r}->r2,{A1.F.wc}->wc1,{A2.F.wc}->wc2,
{A1.M.x0}->x0,{A2.M.x0}->y0,{A1.M.v0}->d0,
{A2.M.v0}->e0,{t}->t
}
Step 6). change system's continually varying transformation rule in the differential algebra program continuously based on the system from the HybridUML model that formulates, we can realize system's continually varying conversion.
Just how to utilize the problem of the concrete conversion of this rule below, provided a sample explanation:
Therefore for example, system is in free during the stage, and the state of system is portrayed by the constraint that mode freeflight among the flightBehavior and the mode free among the manoeuvreflight are satisfied jointly, and what be in the free stage is changed to M continuously
A1.freeflight∧ M
A1.free∧ M
A2.freeflight∧ M
A2.free, according to the incompatible same variable name of shared variable set that changes the semantic conversion rule continuously and obtain according to step 5) in the step 4), above-mentioned continuous variation converts being changed to continuously among the DAP into:
?s11:=A1.freeflight∧s12:=A1.free∧s21:=A2.freeflight∧s22:=A2.free;
Step 7). according to the transformation rule of the discrete transition of the system from the HybridUML model that formulates discrete transition of system in the differential algebra program, the conversion that we can the discrete transition of realization system.
Just how to utilize the problem of the concrete conversion of this rule below, provided a sample explanation:
System comes back to free during the stage from the exit stage, transition A1.manoeuvreBenavior.t_e2f=(A1.exit.exit, A1.free.entry; NULL, A1.M.v=A1.M.v0 ∧ L (f), A1.M.sendsafe ()) and transition A2.manoeuvreBenavior.t_e2f=(A2.exit.exit; A2.free.entry, NULL, A2.M.v=A2.M.v0 ∧ L (f); A2.M.sendsafe ()) takes place simultaneously, can draw these two transition meetings by the algorithm in the shared set of signals that obtains in the step 5) and this step 2 and trigger A1.flightBenavior.t_a2f=(A1.avoidanceflight.exit, A1.freeflight.entry immediately; A1.F.free (); NULL, A1.F.wc:=*) and A2.flightBenavior.t_a2f=(A2.avoidanceflight.exit, A2.freeflight.entry; A2.F.free (); NULL, generation A2.F.wc:=*), so these four discrete transition are a series of discrete transition that taken place to the free stage by the exit stage; According to the incompatible same variable name of shared variable set that disperses transition semantic conversion rule in the step 4) and obtain according to step 5), the discrete transition that above-mentioned a series of continuous discrete transition convert among the DAP do
?s11:=A1.avoidanceflight∧s12:=A1.exit∧s21:=A2.avoidanceflight∧s22:=A2.exit
∧d=d
o∧e=e
o∧L(f);
s11:=A1.freeflight∧s12:=A1.free∧s21:=A2.freeflight∧s22:=A2.free
Step 8). according to basic semantic conversion rule in the step 4) and the method in step 6) and the step 7), be the DAP model with the HybridUML model conversion of system, aerial anti-collision system can convert into:
Starting stage:
The free stage of aerial anti-collision system:
The agree stage of aerial anti-collision system:
The entry stage of aerial anti-collision system:
The circ stage of aerial anti-collision system:
The exit stage of aerial anti-collision system:
Whole aerial anti-collision system can be thought to be made up of these phase process:
FTRM≡(free∪agree∪entry∪circ∪exit)
*
Step 9). use the differential algebra dynamic logic that the system property of needs checking is described, and use the inference rule of differential algebra dynamic logic that attribute is carried out the reasoning checking.
When aircraft is in safely when being meant that aircraft gets into collision avoidance process with certain precondition in whole collision avoidance process, the distance between the aircraft is all the time more than or equal to some safe distance p.The security of this process can be described as by DAL:
Wherein,
B is the maximal value of speed, and T refers to the maximum duration in entry stage; φ ≡ L (p) ≡ (x-y)
2>=p
2FTRM is the combination process model to this process prescription.Be described in through [FTRM] φ that φ in the collision avoidance process always satisfies.If anti-collision system is a safety, then ψ is true.
Step 10). checking finishes.
Claims (7)
1. a CPS modeling and a verification method of changing to the differential algebra program based on HybridUML is characterized in that comprising the steps:
Step 1) defines according to existing HybridUML formalized description, and the HybridUML formalized description is expanded, and provides polynary group of the formalized description of agent and mode;
Step 2) the graphical element that utilizes HybridUML to provide carries out modeling to the CPS system; HybridUML portrays the behavior of system through the structure of agent descriptive system through mode;
Step 3) is according to the definition of polynary group of the formalized description of agent that proposes and mode, provides polynary group the formalized description of each agent and mode in the graphical model of being built;
Step 4) is formulated discrete transition semanteme semantic transformation rule of discrete transition in the differential algebra program among the HybridUML, formulates to change the semantic semantic transformation rule that in the differential algebra program, changes continuously among the HybridUML continuously:
1. the semantic conversion of discrete transition:
Transition among the HybridUML by five-tuple form t=(src, tar, trigger, guard, action)
Src and tar are respectively the reference mark of the source mode and the target mode of transition;
Trigger is the trigger of transition;
Guard is the condition of transition migration;
Action is the action (discrete valuation of variable or generation signal) that transition produce.
Is transition tabel in the differential algebra program shown? State=m
Src∧ guard; Action; State:=m
Tar
Discrete transition among the HybridUML can convert the discrete transition in the differential algebra program to through following rule:
2. change semantic conversion continuously:
HybridUML is through flow, and alge and inv retrain the continuous behavior of agent.
The differential algebra program retrains the continuous behavior of portraying through differential algebra.The continuous behavior of differential algebra program is expressed as state=m ∧ DA-constraints
Flow, alge∧ DA-constraints
Inv, system is in the state m variations per hour of the continuous behavior of generation with DA-constraints
Flow, algeConstraint condition change continuously, and in this continually varying process, must satisfy in this change procedure the invariant constraint DA-constraints that should keep
Inv
Continuous dynamic behaviour among the HybridUML can convert DAP to through following rule:
Step 5) is formulated the algorithm of seeking shared variable in the HybridUML model:
Seek out shared variable set all in the model; What be among the HybridUML that variable that same shared variable concentrates portrays in total system is same variable; Be that variable in the same shared set is same variable; For variable identical in the system is unified variable name, formulate and seek the algorithm of sharing signal in the HybridUML model, seek the shared variable set in the model;
All agent continuous variation of section is sometime portrayed total system jointly in this continuous variation of section constantly among the step 6) HybridUML; According to the continuous variation semantic conversion rule in the step 4), formulate the continuous variation of system system's continually varying transformation rule in the differential algebra program from the HybridUML model; All set that TopMode formed are { tm among the note HybridUML
1, tm
2Tm
n, a certain continuous dynamic behaviour state of system representation can convert following DAP among the HybridUML, wherein
Expression tm
iIn the mode that is possessed of control power:
Discrete transition in the step 7) HybridUML system among some agent may trigger another transition; And maybe be through the discrete transition among shared variable and another agent of shared signal triggering; Formulate algorithm, obtain because of the caused a series of continuous discrete transition of some discrete transition, according to the discrete transition semantic conversion rule in the step 4); The transformation rule of the discrete transition of formulation system from the HybridUML model discrete transition of system in the differential algebra program; Basic ideas are that the behavior through initial transition obtains other transition by this transition generation that behavior causes, and then seek the transition that caused generation by the behavior of the transition that taken place, repeat this process; Up to the generation that does not cause new transition, so just obtained because of the caused a series of continuous discrete transition of some discrete transition;
Step 8) is based on the transformation rule that proposes in step 6) and the step 7); Process according to system's execution; With the HybridUML model conversion of system is the DAP model; System in commission can experience discrete transition of row and continually varying process; In this process; Convert the discrete transition among the HybridUML in the differential algebra program discrete transition according to the rule in the step 6), convert the continuous variation among the HybridUML in the differential algebra program continuous variation according to the rule in the step 7);
Step 9) uses the differential algebra dynamic logic that the system property of needs checking is described, and uses the inference rule of differential algebra dynamic logic that attribute is carried out the reasoning checking;
The step 10) checking finishes.
2. according to claim 1 based on the CPS modeling and the verification method of HybridUML to the conversion of differential algebra program, it is characterized in that the rule that the HybridUML model in step 4) to the step 7) is changed to the differential algebra program, its process is following:
According to discrete transition basic in HybridUML and the differential algebra program and the continuous semanteme that changes; Formulate discrete transition and the basic semantic transformation rule of continually varying between the two; Difference according to system performance between HybridUML and the differential algebra program; According to basic semantic conversion rule, formulate disperse in the system between the two transition and continually varying transformation rule.
3. according to claim 1 based on the CPS modeling and the verification method of HybridUML to the conversion of differential algebra program; It is characterized in that in the said step 1); According to whether comprising other agent, agent is divided into compositeagent that comprises other agent and the basicagent that does not comprise other agent; According to whether comprising other mode, mode is divided into nestmode that comprises other mode and the leafmode that does not comprise other mode;
Polynary group of agent and mode formalized description are as follows:
agent=basicagent||compositeagent
basicagent=(VAR,PARAM,SIG,VAR_PORT,SIG_PORT,TopMode)
compositeagent=(VAR,PARAM,SIG,VAR_PORT,SIG_PORT,VAR_CONN,SIG_CONN,subAgent_INST)
VAR is the set of all variablees among the agent; PARAM is the set that all parameters are formed among the agent; SIG is the set of all signals among the agent; VAR_PORT is the set that all variable ports are formed among the agent, and wherein the pairing variable of all variable ports must belong to the VAR of this agent; SIG_PORT is the set that all signal ports are formed among the agent, and wherein the pairing signal of all signal ports must belong to the SIG of this agent;
TopMode is the behavior of basicagent, is made up of a tlv triple: Mode is the mode that basicagent directly comprised; Initial_trans is the initial transition of Mode, i.e. the initial behavior of basicagent; Current_state has write down the mode that is possessed of control power under this Mode; TopMode has described the behavior of agent, only is present among the basicagent;
TopMode=(Mode,initial_trans,current_state)
VAR_CONN is the set of all variable port connectors among the compositeagent; SIG_CONN is the set of all signal port connectors among the compositeagent; SubAgent_INST is the set that all agent instances of comprising among the agent are formed;
mode=leafmode||nestmode
leafmode=(CONTROLP,flow,alge,inv)
nestmode=(CONTROLP,flow,alge,inv,TRANS,subM_INST)
CONTROLP is the set that all reference mark are formed among the mode; Flow, variable continually varying constraint among the alge portrayal mode; Inv be mode be in active state the constraint that must satisfy; TRANS is the set of all transition among the nestmode; SubM_INST is the set that the sub-mode instances of all that comprise among the nestmode are formed.
4. CPS modeling and the verification method of changing to the differential algebra program based on HybridUML according to claim 1 is characterized in that in the said step 4),
Formulate the continuous semanteme continuous transformation rule that changes semanteme in DAP that changes among the HybridUML, realize the semantic continuous conversion that changes semanteme in DAP of continuous variation among the HybridUML;
1. the semantic conversion of discrete transition:
Transition among the HybridUML by five-tuple form t=(src, tar, trigger, guard, action), src and tar are respectively the reference mark of the source mode and the target mode of transition; Trigger is the trigger of transition, and all triggerings all are signal triggering in HybridUML; Guard is the condition of transition migration; Action is the action that transition produce;
Transition in the differential algebra program? State=m
Src∧ guard; Action; State:=m
Tar, wherein? Expression judges that state is that a state variable is represented the residing state of system; Guard is the transition condition of current transition; When system is in this state and transition condition and satisfies simultaneously, the action of transition will take place, and state variable is in the state after system's transition;
Discrete transition among the HybridUML can convert DAP to through following rule:
2. change semantic conversion continuously:
Flow among the leafmode, the flow among the ancestors mode of alge and inv constraint and leafmode, alge and inv retrain portray jointly agent be in this leafmode variations per hour change continuously the constraint that should satisfy, i.e. the continuous behavior of agent.The wherein continuous variation of flow and alge bound variable, inv provide be in this mode the invariant constraint that should satisfy;
Continuous behavior state=m ∧ DA-constraints among the DAP
Flow, alge∧ DA-constraints
Inv, system is in the state m variations per hour of the continuous behavior of generation with DA-constraints
Flow, algeConstraint condition change continuously, and in this continually varying process, must satisfy in this change procedure the invariant constraint DA-constraints that should keep
Inv
Continuous dynamic behaviour among the HybridUML can convert DAP to through following rule:
5. CPS modeling and the verification method of changing to the differential algebra program based on HybridUML according to claim 1 is characterized in that in the said step 5), can obtain the set that all shared variable sets of system are formed through following algorithm:
Algorithm 1 shared variable set generating algorithm
Input: the variable sets of interfaces CV in the system
Output: the shared variable set SetV of system
Then be designated as PORT by all variable set of interfaces that c connected
c
SetV
c={ v|v ∈ V ∧ port (v) ∈ PORT
cThe variables set of sharing that the c of } //realizes
SetV={SetV
c| c ∈ C
VThe set of } // all shared variable sets
Whether //while condition judgment exists certain two variables set to contain identical variable
{
// two variable set that are shared on same variable are fused into a shared variable set
SetV=SetV ∪ { SetV
cNew shared variable set element behind } // will merge adds among the SetV
}
Change the importation in the above-mentioned algorithm in the system signaling interface collection C
S, just obtain sharing in the system signal set SetS.
6. according to claim 4 based on the CPS modeling and the verification method of HybridUML to the conversion of differential algebra program; It is characterized in that in the said step 6); The continuous variation of formulation system from HybridUML model method of system's continually varying transformation rule in the differential algebra program is that all set that TopMode formed are { tm among the note HybridUML
1, tm
2Tm
n, a certain continuous dynamic behaviour state of system representation can convert following DAP among the HybridUML, wherein
Expression tm
iIn the mode that is possessed of control power:
7. according to claim 4 based on the CPS modeling and the verification method of HybridUML to the conversion of differential algebra program; It is characterized in that in the said step 7), according to the continuous transition formation that following algorithm obtains the initial transition set from a continuous dynamic behaviour state to the continuous dynamic behaviour state of the next one and produced by this initial transition set:
Algorithm 2 continuous transition formation generating algorithms
Input: the transition collection T of system
Output: system is by the initial transition S set of a continuous dynamic behaviour state to next continuous dynamic behaviour state
1And S
1The continuous transition formation Q that produces
2
If the transition among the Q2 are designated as t successively according to its order of in formation, arranging
1, t
2T
p(1≤p≤| T|), wherein | T| is the transition number among the transition collection T of system; S
1In stored in these a series of continuous transition beginning most simultaneous transition, be designated as t
1, t
2T
q(1≤q≤p); Therefore the condition of these a series of continuous transition generations should be S
1In the transition condition of all transition all satisfy; The set of supposing all TopMode of total system is { tm
1, tm
2Tm
n, then reach the continuous transition that next behavior state continuously taken place and can convert following DAP into from a certain continuous behavior state:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110338092.0A CN102426522B (en) | 2011-10-28 | 2011-10-28 | CPS (Cyber Physical Systems) modeling and verification method based on transformation from Hybrid UML (Unified Modeling Language) to DAP (Differential-Algebraic Program) |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110338092.0A CN102426522B (en) | 2011-10-28 | 2011-10-28 | CPS (Cyber Physical Systems) modeling and verification method based on transformation from Hybrid UML (Unified Modeling Language) to DAP (Differential-Algebraic Program) |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102426522A true CN102426522A (en) | 2012-04-25 |
CN102426522B CN102426522B (en) | 2014-12-10 |
Family
ID=45960512
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110338092.0A Expired - Fee Related CN102426522B (en) | 2011-10-28 | 2011-10-28 | CPS (Cyber Physical Systems) modeling and verification method based on transformation from Hybrid UML (Unified Modeling Language) to DAP (Differential-Algebraic Program) |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102426522B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106527383A (en) * | 2016-12-15 | 2017-03-22 | 中国科学院沈阳自动化研究所 | CPS control system for industry and realization method thereof |
CN107561932A (en) * | 2017-07-25 | 2018-01-09 | 东南大学 | CPS anti-collision control methods based on differential dynamic logic |
CN112364532A (en) * | 2020-12-22 | 2021-02-12 | 同济大学 | Unmanned vehicle obstacle avoidance method based on extended hybrid Petri network model |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090094575A1 (en) * | 2007-10-03 | 2009-04-09 | Siemens Corporate Research, Inc. | System and Method For Applying Model-Based Testing To Train Control Systems |
CN101794227A (en) * | 2010-03-08 | 2010-08-04 | 浙江大学 | Method for converting UML (Unified Modeling Language) model into AUTOSAR software assembly model |
-
2011
- 2011-10-28 CN CN201110338092.0A patent/CN102426522B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090094575A1 (en) * | 2007-10-03 | 2009-04-09 | Siemens Corporate Research, Inc. | System and Method For Applying Model-Based Testing To Train Control Systems |
CN101794227A (en) * | 2010-03-08 | 2010-08-04 | 浙江大学 | Method for converting UML (Unified Modeling Language) model into AUTOSAR software assembly model |
Non-Patent Citations (3)
Title |
---|
《Computer Software and Applications》 20080728 Bisanz, S.等 "Executable Semantics for Hybrid Systems - The Hybrid Low-Level Framework " 第64-67页 1-7 , * |
ANDRÉ PLATZER: ""Differential Dynamic Logic for Verifying Parametric Hybrid Systems"", 《AUTOMATED REASONING WITH ANALYTIC TABLEAUX AND RELATED METHODS》, vol. 4548, 31 December 2007 (2007-12-31), pages 216 - 232 * |
BISANZ, S.等: ""Executable Semantics for Hybrid Systems - The Hybrid Low-Level Framework "", 《COMPUTER SOFTWARE AND APPLICATIONS》, 28 July 2008 (2008-07-28), pages 64 - 67, XP031299690 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106527383A (en) * | 2016-12-15 | 2017-03-22 | 中国科学院沈阳自动化研究所 | CPS control system for industry and realization method thereof |
CN107561932A (en) * | 2017-07-25 | 2018-01-09 | 东南大学 | CPS anti-collision control methods based on differential dynamic logic |
CN112364532A (en) * | 2020-12-22 | 2021-02-12 | 同济大学 | Unmanned vehicle obstacle avoidance method based on extended hybrid Petri network model |
Also Published As
Publication number | Publication date |
---|---|
CN102426522B (en) | 2014-12-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Lee | CPS foundations | |
Lygeros et al. | Hybrid systems: modeling, analysis and control | |
Kloetzer et al. | Multi-robot deployment from LTL specifications with reduced communication | |
Hou et al. | Stability analysis of switched linear systems with locally overlapped switching law | |
Bae et al. | Designing and verifying distributed cyber-physical systems using Multirate PALS: An airplane turning control system case study | |
CN102426522B (en) | CPS (Cyber Physical Systems) modeling and verification method based on transformation from Hybrid UML (Unified Modeling Language) to DAP (Differential-Algebraic Program) | |
Oishi et al. | Invariance-preserving abstractions of hybrid systems: Application to user interface design | |
Wang et al. | Numerical investigation of aerodynamic separation schemes for two-stage-to-orbit-like two-body system | |
CN102722593B (en) | Cyber physical system (CPS) attribute verification method based on differential algebra timing sequence dynamic logic (DATL) | |
Krus et al. | Applying function-based failure propagation in conceptual design | |
Chen et al. | Adaptive design of experiments for fault injection testing of highly automated vehicles | |
Umeno et al. | Safety verification of an aircraft landing protocol: A refinement approach | |
Wang et al. | Unsteady interaction mechanism of transverse stage separation in hypersonic flow for a two-stage-to-orbit vehicle | |
He et al. | An improved energy management strategy for hybrid electric powered aircraft based on deep reinforcement learning | |
Abate et al. | Monitor-based runtime assurance for temporal logic specifications | |
Zhong et al. | Towards safe ai: Sandboxing dnns-based controllers in stochastic games | |
CN106712059A (en) | Initiative splitting optimal section searching method for power system based on convex optimization theory | |
Alighanbari et al. | Multi-vehicle coordination and real-time control of connected and automated vehicles at roundabouts | |
Ivanova et al. | Lazy symbolic controller for continuous-time systems based on safe set boundary exploration | |
Haydon et al. | Formal verification of intersection safety for automated driving | |
Wen et al. | Research on the Minimum Safe Distance Model Under Free Flight of Different Models | |
Arogeti et al. | Controllers for flight in a string-type geometry and string stability in a group of UAVs with kinematic and input generator dynamic models | |
Ramos et al. | Modeling conflicts resolution of Unmanned Aircraft System using a lightweight Duration Calculus | |
Ge et al. | Event-Triggered Robust H_ ∞ H∞ Control for Networked Flight Control Systems with Actuator Failures | |
Damm et al. | What you really need to know about your neighbor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C53 | Correction of patent of invention or patent application | ||
CB02 | Change of applicant information |
Address after: Center branch No. 3 ancient Tan Avenue in Gaochun County of Nanjing City, Jiangsu province 211300 Room 405 Applicant after: Southeast University Address before: 211189 Jiangsu Road, Jiangning Development Zone, Southeast University, No. 2, No. Applicant before: Southeast University |
|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20141210 Termination date: 20171028 |