• No results found

5.3 Controller Synthesis Methodology

5.3.1 Timed-Automata Update

In order to enable the features to solve the PI controller tuning problem in the previously proposed automata (Section 4.3.1), modifications are made to the Observer automata from Figure 4.9. Both the Controller (Figure 4.8) and Plant (Figure 4.7) automata remain without changes. In more detail:

Observer

Figure 5.3 shows the automata in charge of coordinating the execution of the controller and the plant. This automata monitors both the controller output U and the process output Y to determine when to finalize the simulation. A new state has been added so after the initialization process the tuning process takes place. This state will modify the initial KP and

KI gains and calculate the new b0and b1coefficients for the controller.

The automaton consists of the following states:

1. Init: Initial state. Initialize the models for simulation. After the initialization the system transitions to the Select Gains state.

2. Select Gains: Gain selection state. In this state both KP and KI gains are modified

Fig. 5.3 Updated Observer automaton. Automaton in charge of the tuning procedure of the controller gains and controlling the data flow between the controller and the plant. This automaton monitors the control signal U and output process signal Y to determine transitions between states.

modifications have been performed, the input reference signal is monitored in order to trigger an event. Once a change in reference has been detected a transition to Transient state is taken.

3. Transient: Transitory state. This is the state in charge of coordinating the execution of the Plant and Controller automata. It monitors both the process output signal Y and the controller signal U to determine when the process has reached a settling condition. Once both the controller and the plant have settled a transition is triggered to the End state.

4. End: Final state. After an event (change in reference) if an equilibrium condition is reached the dynamics process comes to a halt and no more transitions are allowed in any automata.

The Select Gains state and its functionalities have to be included in the UPPAAL im- plementation. The UPPAAL implementation with the updated features is shown in Figure 5.4.

Observer: UPPAAL Implementation

Figure 5.4 shows the automaton in charge of coordinating the correct execution of the controller and the plant. The automaton modifies the values of the controller gains KP

and KI in order to tune the controller. Once the gains have been modified the calculation

of the controller’s transfer function coefficients is done. This automata monitors both the controller output U and the process output Y to determine when to finalize the simulation. The coordination of the execution of the controllers and the plants is achieved by using synchronization channels C and D (one per system approximation). This automata sends a

message via channels C and D to enable the execution of either the Plant or the Controller automata for both the over and under approximations.

The automaton consists of the following states:

1. KP: Initial and KP tuning state. This state functions partially as the Init state and

the Select Gains state depicted in Figure 5.3. The tuning process is split into two states instead of one as in the automata from Figure 5.3. This state is dedicated to the selection of the KPgain. The model checker non-deterministically selects a ∆KP

value to modify the initial KP gain. The size of ∆KP is determined by the ∆KPSSsize

step and the KPU Lupper and KPLLlower boundaries (Figure 5.2). This state can be

bypassed to avoid modifying the KP gain value. Once the gain modification has been

performed a transition to KI state is taken.

2. KI: KI tuning state. This state functions partially as the Select Gains state depicted in

Figure 5.3. The model checker non-deterministically selects a ∆KI value to modify

the initial KI gain. The size of ∆KI is determined by the ∆KISS size step and the

KIU Lupper and KILLlower boundaries (Figure 5.2). This state can be bypassed to

avoid modifying the KI gain value. Once the gain modifications have been performed

function CoCa is called to calculate the new b0and b1 coefficients. Input reference

signal is monitored in order to trigger an event. Once a change in reference has been detected a transition to Sync state is taken.

3. Sync: Transitory state. Similar to Transient state depicted in Figure 5.3. State in charge of coordinating the execution of the Plant and Controller automata. It monitors the process output signal Y, the controller signal U, and the elapsed time to determine when to finish the automata execution. The observer coordinates both the over and under approximations via communication channels. Once both the controller and the plant in both over and under approximations have settled and no time-out condition is detected a transition is triggered to the End state.

4. End: Final state. Similar to End state depicted in Figure 5.3. After an event (change in reference) if an equilibrium condition is reached the dynamics process comes to a halt and no more transitions are allowed in any automata.

5. Timeout: Fail-safe state. A pre-defined amount of time is given to the process to reach an equilibrium. In order to save memory and computations, this condition is added. If the process does not reach an equilibrium within the allowed amount of time the automaton transitions to this state.

Fig. 5.4 UPPAAL implementation of the observer automaton. Automaton in charge of controlling the data flow between the controller and the plant. The controller tuning process has been incorporated. Gains KP and KI are modified in order to find a suitable combination

which drives the process to meet requirements. This automaton monitors the control signal U, output process signal Y, and the elapsed time to determine transitions between states. It coordinates the execution between plants and controllers using communication channels C and D. One channel is used for the over approximation and the other one for the under approximation.

With these new features included in the automata the controller tuning process can take place. From a model checking point of view, the controller design process is similar to the previously presented requirements verification process in Section 4.4. The following section explains the required modifications to the model checker queries and the differences with the previous verification process.