the set-point chosen was equals 18 LPM, and for the
pressure the value was equals 33 mBar.
The common outputs of the transfer functions
were added by means of two blocks Sum. Using the
same block, the negative feedback of the loops can be
implemented in off-diagonal paring.
At last, the flow and pressure curves along time
were observed using the block Scope. The values
are stored on the MATLAB console by means of the
block To Workspace.
4.2 Modeling in Ptolemy
On the Ptolemy II enviroment, the simulation model
to be implemented is based in hierarchical actor
model. The actors are components that execute con-
currently and share data with each other by sending
messages by means of input/output ports. All the
messages communicated via a port is referred to a sig-
nal. Besides, the connection between actors is esta-
blished by a relation (Ptolemaeus, 2014).
The director is a MoC which specifies the se-
mantic domain of the simulation. Furthermore, the
Ptolemy II allows to build submodels which use
others domains due to support heterogeneous model-
ing.
Relative to the modeling of the didactic platform
as a TITO plant, four ports were used to represent the
inputs v(s), i(s), and the outputs q(s), p(s). The trans-
fer matrix G
p
(s) was modeled using a opaque com-
posite actor (i.e., actor model that has not director)
named as DidacticPlatform, which is constituted by
four actors ContinuousTransferFunction (to symbol
the transfer functions G
p
11
(s), G
p
12
(s), G
p
21
(s) and
G
p
22
(s)) and two actors AddSubtract (to sum the com-
mon outputs of the transfer functions).
The control system were implemented using
modal models, where a multiplicity of distinct abs-
tract models are combined to model the same sys-
tem (Lee, 2014). Thus, the PI decentralized con-
trollers were obtained by means of two modal models
named as Controller21 (to control the pressure from
the voltage signal) and Controller12 (to control the
flow from the current signal). Each model is com-
posed by two control level, which are distinguished
by the domain.
In the high-level control, there is a discrete-time
model constituted by a FSM with two states associ-
ated to the dynamics imposed on actuator. For the
Controller21, the states are to increase or to decrease
the frequency on the frequency inverter; and for the
Controller12, the states are to open or to close the
control valve.
In the low-level control, there is continuous-time
model composed by a Continuous-Director and a set
of actors Gain, Integrator and AddSubtract intercon-
nected to execute the proportional-integrative action
of the controller. The gains K
p
and K
i
of the Con-
troller12 and Controller21 models present the same
values obtained for the controllers G
c
1
(s) and G
c
2
(s),
respectively.
The connection between the control levels were
realized by means of the states refinements. Each re-
finement specifies a continuous behavior in the low-
level control, and the guards of the FSM determine
whether the refinement must be actived or not at given
time in the high-level control.
The guards of the Controller21 verify whether
the pressure measured is contained in the interval
[pressureMin, setpoint). If this condition is true, then
it occurs the transition from the state DecreaseFre-
quency to the state IncreaseFrequency. Else if the
pressure measured is contained in the other interval
(setpoint, presssureMax], then it occurs the transition
between the states in the opposite direction.
Analogously, the guards of the Controller12
verify whether the flow measured is contained in the
interval [ flowMin, setpoint). If this condition is true,
then it occurs the transition from the state CloseValve
to the state OpenValve. Else if the flow measured is
contained in the other interval (setpoint, flowMax],
then also it occurs the transition between the states in
the opposite direction.
The set-point value as well as the minimum and
maximum values were defined according to the con-
trolled variable. For the flow variable, the set-point
chosen was equals 18 LPM, and the minimum and
maximum value were 3 LPM and 38 LPM, res-
pectively. In the case of the pressure variable, the set-
point chosen was equals 33 mBar, and the minimum
and maximum value were 2 mBar and 130 mBar, res-
pectively.
On the main model, it was also used a Continu-
ous Director to define the relationship between the ac-
tors models DidacticPlatform, Controller21 and Con-
troller12, which were connected in off-diagonal par-
ing. To represent the time delay of the TITO plant,
the actor TimeDelay were also connected the Didac-
ticPlatform, with the value equals 3 seconds. At last,
the flow and pressure curves were observed using the
actor TimedPlotter.
5 EVALUATION OF THE
LEARNING TOOLS
To verify the application of these software environ-
ments as learning tools for modeling engineering sys-
SoftwareEnvironmentsasLearningToolsforModelingEngineeringSystems-ACaseStudyonDecentralizedMulti-loop
ControlSystem
227