3.4 Simulation Results
To validate the PLC program, all scenarios must be
executed and satisfied during simulation. For this,
we can verify if the final state automaton is
reachable by using the query:
E <> recipe_book.valides (1)
However the model checker does not return any
trace if (1) is not satisfied. Thus (1) is only useful to
determine if programs are valid or not, but not
sufficient for diagnosis. So instead of this property,
we verify if there exists a blocking step of a scenario
where the corresponding condition is not satisfied by
using the query:
E<>time_step.timeout (2)
Time step is a timer which counts the elapsed time
for any step of the recipe book. If (2) is satisfied, the
model checker will return directly the scenario and
blocking step on which simulation stopped.
Moreover, by analysing the current state of
programs, it will help for diagnosis. After a first
simulation (see results in Table 2), we realized that
(1) is satisfied and (2) is not: this is far from being a
surprise because the program we used here has
already been validated during factory tests.
In the following example, we used a modified
program to verify if problems can be diagnosed
during simulation. Table 2 presents simulation
results, and gives the time and memory used for
verification (on a windows machine with 4Gb RAM,
Core i5).
Table 2: Simulation results.
As expected, (1) is not satisfied for the modified
program, but to diagnose the problem, it is not
sufficient. So when we verify by using (2), the
model-checker has shown that the instruction N°1 of
overcurrent test is blocking (step x1 of Figure 8)
because the circuit breaker did not open after
overcurrent. Moreover, when we analyse the current
state of circuit breaker SFC program in simulation
results (see in Figure 10), we notice that its
evolution stopped in that moment on a step where it
was waiting for opening order (step x5 of SFC
program grafCtrCmdeDJGT1 in variables column
of Figure 10). Thus, we conclude that the transition
following that step is not correct because it did not
take into account the overcurrent information. This
result was expected because the expression “or
Imax” was initially deleted from that transition.
After correction and second simulation, the
instruction N°2 of overcurrent test (transition ft2 of
Figure 8) is not satisfied because the circuit breaker
started closing when it received that order whereas it
should not. In fact, the circuit breaker must stay
opened while overcurrent does not disappear. This
result was also expected because the expression
“and not Imax” was also deleted from SFC
program’s transition. In that way, we can diagnose
quickly and correct the whole program by referring
to the expected results of recipe book, and
simulation does not require too much memory. Its
efficiency has already been validated with some
examples of wrong programs.
4 SAFETY PART VERIFICATION
Although recipe book has served to validate
PSEEL’s programs for many decades, it is not
sufficient to verify formally installations safety. In
fact, the previous method does not study all the
reachable states of system (meaning all the 2
Ne
possible states, with Ne = number PSEEL’s sensors
+ number of received orders). Moreover, it has also
been proved in (Coupat, 2014) with a specific
PSEEL, that there exists one scenario (with low
occurrence) not included in recipe book, but which
can expose that PSEEL in dangerous state, meaning
that the method is not exhaustive. So supposing that
events like sending orders by operator or faults
apparition can occur whenever on system, the
principle is to check with Uppaal if each of these
states is not dangerous (meaning does not violate a
set of safety properties). Therefore recipe book will
no more represent a reference of verification. We
delete its model and we add two others ones that
generate randomly faults (left side on Figure 11) and
sending order (right side of Figure 11). With the first
model, fault can take two possible boolean values
(true or false), and with the second one a device’s
SFC program can receive opening order from
operator (co=true and cf=false), closing order
(co=false and cf= true), or no order (co=false and
cf=false). During a PLC cycle, an order sent by an
operator would not have any effect on system if the
SFC program of the targeted device was not in a step
waiting for that order. Thus, to avoid ineffective
orders and reduce states space, we added some
guards in these models.
ICINCO 2017 - 14th International Conference on Informatics in Control, Automation and Robotics