Next Article in Journal
Enabling Real-Time Quality-of-Service and Fine-Grained Aggregation for Wireless TSN
Next Article in Special Issue
Evaluation of the Uncertainty of Surface Temperature Measurements in Photovoltaic Modules in Outdoor Operation
Previous Article in Journal
Cross Deep Learning Method for Effectively Detecting the Propagation of IoT Botnet
Previous Article in Special Issue
Maximum Power Point Tracking-Based Model Predictive Control for Photovoltaic Systems: Investigation and New Perspective
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Smart Sensorization Using Propositional Dynamic Logic

by
Salvador Merino
1,*,†,‡,
Alfredo Burrieza
2,
Francisco Guzman
3 and
Javier Martinez
1,‡
1
Department of Applied Mathematics, University of Malaga, 29071 Malaga, Spain
2
Department of Philosophy, University of Malaga, 29071 Malaga, Spain
3
Department of Electrical Engineering, University of Malaga, 29071 Malaga, Spain
*
Author to whom correspondence should be addressed.
Current Address: Faculty of Industrial Engineering, University of Malaga, 29071 Malaga, Spain.
These authors contributed equally to this work.
Sensors 2022, 22(10), 3899; https://doi.org/10.3390/s22103899
Submission received: 20 April 2022 / Revised: 16 May 2022 / Accepted: 17 May 2022 / Published: 20 May 2022
(This article belongs to the Special Issue Advanced Sensing Technologies in Photovoltaic Systems)

Abstract

:
The current high energy prices pose a serious challenge, especially in the domestic economy. In this respect, one of the main problems is obtaining domestic hot water. For this reason, this article develops a heating system applied to a conventional water tank in such a way as to minimize the necessary energy supply by converting it, under certain circumstances, into atmospheric. For this purpose, the domotic system has been equipped with sensors that automate the pressurization of the compartment and solenoid valves that regulate the external water supply. This design, to which different level sensors are applied, sends the information in real time to an artificial intelligence system, by means of deductive control, which recognizes the states of the system. This work shows the introduction of an extension of propositional dynamic logic in the field of energy efficiency. Thanks to this formalism, a qualitative control of the program variables is achieved by incorporating qualitative reasoning tools. On the other hand, it solves preventive maintenance systems through the early detection of faults in the installation. This research has led to the patenting of an intelligent domestic hot water system that considerably reduces energy consumption by setting disjointed heating intervals that, powered by renewable or non-renewable sources, are controlled by a propositional dynamic logic.

1. Introduction

In this paper we present an intelligent control system for the storage and supply of domestic hot water suitable for domotic installations. This system can take advantage of alternative energy sources (such as DHW solar panels and/or photovoltaic panels for heating the electrical resistance) in order to achieve the highest degree of sustainability and ecology. The behavior of this system can be represented by a logical formalism that allows to describe the processes of the system, to detect failures in it, and to facilitate the tasks of maintenance of the installation. The formalism used is very versatile and allows its application in very diverse areas of domotics, which we will demonstrate through some examples.
Current domotic control systems [1] and energy efficiency [2] have evolved from the simple activation and deactivation of loads [3] to having to consider combinations of states in sensors and actuators [4], determining the mode of operation of the same. An example of this can be found in the control of large photovoltaic solar farms [5], where possible reconfiguration [6] and maintenance [7] problems in the panels require precise measurement [8] and control of each unit [9] through separate activations or outages [10]. The profusion of states to be considered in some systems means that a process is needed to ensure that none of the circumstances that may occur in that process are ignored.
This is not something new; in fact, there are already languages that try it, such as GRAFCET, using logic gates [11]. This language is a procedure of synthesis and reduction of both the steps and the memory locations needed to automate an industrial process, using the existing digital simplification methods [12]. Its main problem is that if there is a malfunction of the deduced system, it is very difficult to determine where the error is, since the relationship between the resulting equation and the real logic of the system’s operation has been lost [13]. We need a formalism in which that does not happen, so that it can easily be determined where the dysfunction of the resulting equation is located. One of our fundamental aspirations in this paper is to introduce a logic that takes this aspect into account.
On the other hand, in domotic systems, many applications require incremental regulation in what are called “relative values” [14]. An example can serve to clarify these concepts: if we have an intelligent irrigation system, its operation will allow irrigation of it only when the humidity level of the soil requires it, and it can even take measurements in several locations to determine an average value of that humidity [15]. If the value of this humidity advises it, the irrigation system will be activated, but how long will it be irrigated? Normally, for a complete irrigation cycle to be carried out, it suffices that the activation threshold value has been reached, whether or not so much water is required. We need a reasoning system through which we can get it to irrigate, not according to a specific calendar and time, but in the fair value of humidity that our plants require [16]. For this reason, what we will undertake is to increase “a little” the necessary activation time until the desired humidity level is reached.
The examples presented prove the importance of considering qualitative aspects that require to have an intelligent control. The advantage of using qualitative information is that it allows us to handle situations in which we do not need precise numerical information of the system to make decisions [17]. In doing so, we incorporated tools of the qualitative reasoning (QR) to domotic, an approach with many applications in artificial intelligence (AI) (see, for example, [18]).
We propose in this paper a formal representation of domotic systems dealing with all these issues and applied to our invention. Our purpose is to overcome both errors and omissions that may have occurred during its application, in order to be able to contrast what was programmed with the intended rational operation. In addition, the formalism employed allows the incorporation of qualitative information on the status of certain variables and manages it to perform actions [19].
A domotic system can be modeled as a (finite) set of objects belonging to a building (windows, lights, taps, awnings, elevators, appliances, heating systems, etc.) or physical entities with measurable magnitudes (temperature of the water or of a room, the water flow of a tap, the intensity of light, etc.). We will express the properties of states by labels (state labels) that can be numerical (if we want to be precise) or qualitative. Qualitative state labels can be either dichotomous (e.g., open or closed) as well as with gradations (e.g., little, quite, many, …) [20].
The representation of the behavior of a domotic system can be performed by what are called scenes. A scene is an abstract representation of the behavior of a domotic system at a given time, taking into account the state of the variables that we use to describe it. Since a domotic system is a dynamic system, it undergoes modifications, which gives rise to a transition between scenes. In our approach, this transit can be expressed through operations of composition between qualitative labels as values of our variables. For this purpose we will use a qualitative arithmetic based on absolute orders of magnitude (AOM) [21], in which different qualitative sum operations will be defined. The orders of magnitude arise from making some kind of partition of the real line into equivalence classes, where the numbers are grouped under the same category or qualitative class (large, medium, small, …). Arithmetic operations between qualitative classes depend on how the boundaries of these intervals are defined. A study of the properties of different tables for the qualitative sum can be found in [22].
An appropriate formalism to attend transitions between states as well as qualitative arithmetic operations which can generate these states is propositional dynamic logic (PDL) [23]. An advantage of using PDL as a base is that we can make the transition between scenes using a program. PDL also allows us to describe the interaction between actions of computer domain and propositions about situations that we consider relevant for the system that we are dealing with. In addition, it is easy to integrate qualitative arithmetic into PDL through programs. The extended PDL with this feature will be called Dom.
Other logics are also designed to deal with state transitions (e.g., transaction logic [24], event calculus [25], situation calculus [26]); however, we do not need represent specifically the time (as event calculus or situation calculus). In addition, many of the aforementioned are predicate languages [27], which leads to problems with decidability. In our case we have a decidable propositional language, PDL [28], for which has been developed model checking techniques [29] and automated theorem proving techniques [30] through application examples [31].
The article is structured as follows: Section 2 introduces the intelligent multi-behavioral solar water heating system. Section 3 is dedicated to the logic Dom, created specifically to solve domotic systems. In Section 4, the formalization of the intelligent solar water heating system is carried out, using propositional dynamic logic. The last section is devoted to conclusions.

2. Design of an Intelligent Solar Water Heating System (ISWHS)

The system presented is a hot water accumulator model adapted for solar collector systems which also incorporates an electrical resistance to heat the water of the accumulator when it is required. In actuality, there are multiple systems of this type and in all cases the consumption of hot water is replaced by cold water entering from the external network causing a decrease in temperature, while the electrical resistance tries to compensate for this loss of heat. The problem is that it is not always possible to maintain a temperature acceptable to the user, and, in addition, there is a significant consumption of electrical energy.
Our system solves these problems, is innovative in its design and operation (there is a patent: [32]), minimizes the consumption of electrical energy, and ensures the maximum efficiency of solar panels. Briefly stated, we start from an initial situation in which the accumulator is completely full, the inlet valve of cold water from the network is open, and the air inlet/outlet valve and hot water outlet valve are closed. When there is no solar supply and there is hot water consumption, the system will allow, by means of a set of solenoid valves (the air inlet/outlet valve and the hot water outlet valve open, meanwhile the cold water closes), that the accumulator is emptied to a certain level, significantly lower than the maximum (first stage). At that moment, the second stage begins, during which cold water is allowed to enter from the network and an electrical resistance can be placed into operation. When the water reaches a predetermined intermediate level (third stage), the cold water valve closes. With the consumption, the water of the accumulator descends again to the low level (of the second stage) and the process is repeated, oscillating the water between the two levels (low and intermediate). This process continues as long as there is no caloric inlet from the solar panels. When the solar collector circuit supplies hot water again, the cold water circuit is opened and the electrical resistance (fourth stage) is deactivated. When the water reaches the maximum level (fifth stage), the system returns to the initial state (closing the air inlet/outlet valves and the hot water inlet valve).
We note that the fourth stage can begin in any of the first three stages above, depending on how long the solar collectors circuit is inactive. The second hot water outlet (⑦ in Figure 1) is opened and closed automatically and its behavior has not been described, as it lacks logical control.
This system has several advantages over traditional systems:  
  • In traditional systems, the cold water that enters from the network is heated to replenish the hot water consumed when there is not enough solar radiation. In our case, the accumulator is left emptying and the only contribution of the electrical resistance is usually used to keep the water in the accumulator hot (but at a low level of the accumulator volume). Once the solar contribution is recovered, cold water is introduced from the network but it is heated by solar energy. This is a significant energy saving.
  • As no cold water is introduced during the first stage, in which the water of the accumulator is emptied by the consumption of hot water by the users, there is no decrease of the water temperature in the accumulator by the inlet of cold water, which is normal since the cold water inlet valve is closed. This system keeps the water hot for longer.
  • During the second stage, the hot water consumed is replaced by cold water from the network heated by the electrical resistance. However, since the water volume of the accumulator is lower (not the entire tank, but a quarter), the heat input of the resistance is also lower than a traditional system. Therefore, the energy saving also occurs at this stage.
  • During the third stage, the accumulator is filled with cold water from the network to return to the initial situation and the solar collectors are heating the water. The temperature of the water inside the accumulator decreases and therefore the temperature difference in relation to the water temperature of the solar collectors is maximum. For this reason, this design ensures maximum efficiency of the solar panels, since the differential of temperature of the water passing through the panels with the water of the accumulator will always be maximum. This produces the maximum performance of the solar collectors.

2.1. System Description

The system presented (see Figure 1) aims to achieve maximum energy efficiency. Unlike traditional ones, where the accumulator has four inlets/outlets, the current one has six. The conventional inlets/outlets are those that connect the accumulator ⑫ to the solar collectors or primary circuit ⑬, a cold water inlet of the network controlled by the solenoid valve ⑥ and a hot water outlet controlled by the solenoid valve ⑦. The two additional inlets/outlets are one to allow air to enter the tank ① and another one for the hot water outlet ⑧. The solenoid valves or non-return valves have the purpose of controlling the opening/closing of the inlets/outlets. In total there are three solenoid valves, two of which we have already mentioned, and are as follows:  
-
The air inlet to the accumulator (A).
-
The cold water inlet from the network to the accumulator (CW).
-
The hot water outlet from the accumulator (HW)
(located in the figure in the places ①, ⑥, and ⑧, respectively).
We also have three water level probes inside the accumulator (numbers ②, ③, and ④ and an electrical resistance (ER) ⑤).
In this system we will consider three types of temperature:
-
The temperature of the water inside the accumulator (AT), measured by the temperature probe ⑪.
-
The temperature of the water passing through the panels (PT) measured by the temperature probe ⑩.
-
The temperature requested by the user or setpoint temperature (ST).

2.2. System Operation

The general operation is based on the comparison between three different types of temperature and the levels reached by the water inside the accumulator, which will condition the opening and closing of three solenoid valves and the activation or deactivation of an electrical resistance.
We start with a situation where the accumulator is full of water and the CW is open while A and HW are closed.  
  • The operation of the primary circuit is automatic: when the temperature of the water leaving the panels (the same water passes through them, one after another, since they are in series) is greater than that of the water inside the accumulator, water circulates due to the thermosyphon effect. When this is not the case, the water will not flow. This does not need control since it is a physical phenomenon.
  • Let us describe the operation of the rest of the circuit:
    • When AT is greater than PT, the three solenoid valves will be activated as follows: CW closes, while A and HW open.
      The three valves remain in their respective states until the water level inside the accumulator reaches the position of the level probe 3 (LP3) (see Figure 2).
      At that time, CW opens and we proceed to activate, or not, the electrical resistance (ER), according to the comparison between AT and ST as follows:
      -
      If AT is lower than ST, then ER is activated to the hot state;
      -
      If AT = ST, then ER is activated to the normal state;
      -
      if AT is greater than ST, then ER must be deactivated (cold state).
      In addition, cold water will continue to enter until the water level inside the accumulator reaches the level probe 2 (LP2). In this case, CW is closed.
      This process will allow the water level to be between probe 2 and 3 while the hot water is being used to consume through the lower outlet of the accumulator (see Figure 3).
    • When PT is greater than or equal to AT, CW will open and ER will be deactivated; when the water reaches level probe 1 (LP1), A and HW will close (see Figure 4).
    It should be noted that this process will lead to AT being greater than or equal to PT (again, previous case). Recall that previously we started from the situation we have now reached with respect to the three solenoid valves: CW is open while A and HW are closed; this describes a circuit.
With this system we can guarantee the maximum efficiency of the solar panels, since the temperature differential with the water inside the accumulator will always be maximum. In addition, the cooling of the water inside the accumulator is also prevented by the entry of cold water from the network, a situation that occurs when hot water is consumed in conventional installations.
The operation of the above described system can be expressed by the following Algorithm 1:
Algorithm 1 Procedure of an intelligent water heating system (PIWHS)
Initial situation: the accumulator is full of water, CW is open, and A and HW are closed.
begin    //Compare AT and PT//
while  true  do
   if AT > PT then
         Close CW and Open A and HW;
         if the water level of the accumulator reaches the probe 3 then
             Open  CW;
            if
               AT < ST ⇒ pass ER intensity to hot;
               AT = ST ⇒ pass ER intensity to normal;
               AT > ST ⇒ Turn off ER;//ER must be in cold state//
            fi
         end if
         if the water level of the accumulator reaches the probe 2 then
            Close CW;
         end if
   else       //AT ≤ PT//
         Open CW and Turn off ER;
         if the water level of the accumulator reaches the probe 1 then
               Close A and HW;
         end if
   end if
end while
end

3. The Logic Dom

When using tools for solving domotic problems, such as the one described above, the application of propositional dynamic logic will be used. In this case it will be called Dom logic.

3.1. Notation and Basic Concepts

We will use two types of expressions. On the one hand, expressions such as ( x 1 , , x k ) are called scene formulas, where each x i is an element of a set of state labels L i . These labels express gradations of the physical magnitudes (e.g., light intensity, tap water flow, room temperature, etc.) or certain states in which the element of the system are found (e.g., the elevator is on second floor, the tap is closed). For example, consider a domotic system in which we want to refer to the state (off or on) of the light and the degree of temperature of a room. We can consider a scene x = ( x 1 , x 2 ) , where x 1 is the state of light within the range L 1 = { on , off } and x 2 is the state of the room temperature within the range L 2 = { very   low , low , normal , high , very   high } . Then the scene ( on , high ) means that the light is on and the room temperature is high. In actuality, in a scene formula we wish to represent only certain relevant aspects of the states in which a domotic system is found; however, many other things can happen that are beyond the description of the scene formula and which, eventually, we may be interested in taking into account. That expressed by the previous scene ( on , high ) could happen, for example, whether the room temperature is pleasant for the homeowner or not, as if one of the lamps does not work, or all are in perfect condition, etc.
In a scene formula we can use a special label, the empty label, denoted by “−”; its intuitive meaning is to represent that there is no information about the state of a particular component of the scene or that it is not necessary to specify that state (because it has not been modified from a previous specification or for any other reason). The label “−” also allows us to create a common scene to specific scenes, which implies a greater degree of abstraction. Thus, ( on , ) refers as concrete instances to (on, very-low), (on, low), etc. Note that “−” (which is not actually a state label) in the latter sense comes to play the logical role of a variable.
Given a scene formula x = ( x 1 , , x k ) , we will use the expression x { 1 / 1 , , k / k } to indicate that we replace simultaneously in x each component x i for i (we admit the possibility x i = i . This indicates that there is no substitution in the i position. It will be useful to consider this possibility), which we denote abbreviated by i / i and where i denotes a state label in L i . The expression x { p 1 , , p r } means that we highlight in x the positions p 1 , , p r { 1 , , k } . Similarly, the expression x { ϵ 1 / p 1 , , ϵ r / p r } , with highlighting positions p 1 , , p r , is obtained by replacing simultaneously the label of each position p i of x by ϵ i .
The composite operations to make transitions among scenes are performed between the elements of each set of state labels L i with a special set of labels called gradient labels, denoted by L G . We can use different sets of gradient labels for different set of state labels depending on the application in mind. As an example of set L G of qualitative labels, a classical partition of R in qualitative classes appears in Figure 5 (see [20,21]):
NL = ( , β ) PS = ( 0 , α ] NM = [ β , α ) 0 = [ 0 ] PM = ( α , β ] NS = [ α , 0 ) PL = ( β , + )
The labels means “negative large” (nl), “negative medium” (nm), “negative small” (ns), “zero” (0), “positive small" (ps), “positive medium” (pm), and “positive large” (pl). The constants α , β are real numbers that are used to delimit the equivalence classes (the particular criteria to choose these numbers would depend on the application in mind).
Now, we introduce some notation. If 1 and 2 are two labels (of state or gradient), then 1 2 means that 1 is previous to 2 , that is, for any x 1 , and y 2 , we have that x < y . In the previous case, we have the order NL NM NS 0 PS PM PL . When we use state labels that express dichotomy such as on, off, we will consider off ≪ on. The notation ≫ indicates the inverse relationship of ≪; also, 1 ̲ 2 means that 1 2 or 1 = 2 .
A set of gradient labels L G is intended to increase or decrease the magnitudes of the variables of a scene operating on the status labels using composition. Thus, using the previous partition as set of gradient labels, if the light has a low intensity (state label), we can increase it a little, that is, with a small number or belonging to ps (gradient label), which may result that the light remains within the range of low (even if it has increased in intensity) or pass to the normal state (new label status). In order to perform the compositing operations in this case, we will translate the state labels into gradient labels and use a previously defined qualitative sum operation according to our interests.
There are several types of expressions that we can form when performing operations of composition in the positions of a scene formula. Therefore, the notation p i + i + : p i indicates that in the position p i we must perform a composition operation (sum) between the state label p i L p i and the (positive) label i + . The nature of + (numerical or qualitative) obviously depends on the labels involved. The sum is qualitative if at least one of the factors is qualitative. If both labels are qualitative, then i + is always a (positive) gradient label and the operation must always generate a qualitative state label p i L p i such that p i ̲ p i . If p i L p i is qualitative and i + is numerical, then the result of the composition is also a qualitative state label p i L p i such that p i ̲ p i . In the same sense, it occurs if p i L p i is numerical and i + is qualitative.
Similarly, p i + i : p i indicates that in the position p i , we compose its corresponding state label p i L p i with the (negative) gradient label i , which generates a state label p i L p i such that p i ̲ p i .

3.2. Syntax

The language of Dom is an extension of the language of PDL with a new set of atomic formulas and specific atomic programs. Concretely, Dom contains the propositional operators → (material implication) and ⊥ (falsity), the program operators ; (composition), ∪ (choice), and (iteration) and the mixed operators [ ] (necessity) and ? (test). As defined symbols we have ⊤ (truth), ∧ (and), ∨ (or), ↔ (if and only if), and (possibility) as usual. Formulas and programs are built inductively, using the previous operators, from P (a set of alphanumeric chains), L = L 1 × × L k (a set of scene formulas) being each L i ( 1 i k ) a finite set of state labels and a specific parametrized program (called regulator) consisting of several subroutines that analyze below (although regulator can be declared in subprograms we consider it an atomic program, since it requires the simultaneity of all the subprograms that form it, so that it can not be obtained from these with the classic PDL operations as ; or ∪).
If x = ( x 1 , , x k ) is a scene formula, then we have as programs the following ones:
  • Inc x { p 1 + 1 + : p 1 , , p n + n + : p n } (increase): This program means that we must increase the level of the values of the positions p 1 , , p n of x, respectively, by the positive labels 1 + , , n + , using a sum operation + (qualitative or numerical). A simultaneous replacement of p i by p i + i + is carried out; e.g., increase a little the temperature of the living room.
  • Dec x { p 1 + 1 : p 1 , , p n + n : p n } (decrease): This program means that we must decrease the level of the values of the positions p 1 , , p n of x, respectively, by the negative labels 1 , , n , using a sum operation + (qualitative or numerical); e.g., decrease much the intensity of the kitchen light.
  • Change x { p 1 / p 1 , , p n / p n } (change): This program means that we must replace simultaneously the state labels of the positions p 1 p n of x (i.e., p 1 , …, p n ), respectively, by the state labels p 1 , …, p n (e.g., set the room temperature to 20 C, …).
  • Watch x { p 1 , , p n } (watch): This program means that we simply watch the state labels of the positions p 1 , , p n of x; it is assumed that these would be maintained if there are no actions that change them. The purpose of this program is to explicitly check that these labels do not change even if those in other positions do.
The following program collects all of the above in a single order and is defined:
  • Reg x Ψ 1 , Ψ 2 , Ψ 3 , Ψ 4 (“regulator”), where Ψ 1 = { p 1 + 1 + : p 1 , , p l + l + : p l }
    Ψ 2 = { q 1 + 1 : q 1 , , q m + m : q m }
    Ψ 3 = { p 1 / p 1 , , p n / p n }
    Ψ 4 = { q 1 , , q o }
    and p 1 , , p l , q 1 , , q m , p 1 , , p n , q 1 , , q o are positions of x, all different, and at least one Ψ i ( 1 i 4 ) is not empty.
That is, regulator executes the actions of Inc x Ψ 1 , Dec x Ψ 2 , Change x Ψ 3 , and Watch x Ψ 4 simultaneously, something very important in domotic, and without problems, because the positions of the different subprograms that include it are all different. This allows to create a final scene with all the actions executed of these programs without going through intermediate scenes, which would result in case of proceed sequentially.
Note that we can define the previous programs in terms of regulator by a very simple procedure: place the empty set of operations with labels in the corresponding part. Thus, we define
Inc x Ψ 1 = d e f Reg x Ψ 1 , , , Dec x Ψ 2 = d e f Reg x , Ψ 2 , , Change x Ψ 3 = d e f Reg x , , Ψ 3 , Watch x Ψ 4 = d e f Reg x , , , Ψ 4
In general, we will use an expression such as Inc x Ψ , Dec x Ψ , etc., when we want to refer to one of these programs without specifying the set of substitutions that the program performs in the x scene. With this in mind, we can introduce new specific programs from Change x Ψ to treat dichotomous states, so we have
  • On x { p 1 , , p n } (“turn on all the positions p 1 , , p n of x”).
  • Off x { p 1 , , p n } (“turn off all the positions p 1 , , p n of x”).
That is, we have
On x { p 1 , , p n } = d e f Change x { on / p 1 , , on / p n }
and
Off x { p 1 , , p n } = d e f Change x { off / p 1 , , off / p n } .
We can also define mixed dichotomous programs that combine the actions of the previous ones. For example,
  • Onoff x Ψ 1 , Ψ 2 . This program combines On x Ψ 1 and Off x Ψ 2 , where Ψ 1 and Ψ 2 are sets of distinguished positions of different x.
  • Onoff x (“exchange on and off”) is a generic modification of the previous program Onoff x Ψ 1 , Ψ 2 , that simply does not require previous identification of the positions to be activated/deactivated (the system reads the status of all positions and performs this order automatically, going through all of them). In actuality, Ψ 1 are all positions in the scene with off and Ψ 2 are all positions in the scene with on. This program activates in x all positions that are deactivated and at the same time deactivates all positions that are enabled; e.g., one result would be to turn all lights on (that are off) and turn off all lights (that are on) simultaneously.
Now we give some definitions about scene formulas.
Definition 1.
Let x = ( x 1 , , x k ) and y = ( y 1 , , y k ) be scene formulas. We say that x is different from y if x i y i for some i { 1 , , k } .
Definition 2.
Let x = ( x 1 , , x k ) and y = ( y 1 , , y k ) be scene formulas and let us consider the program Reg x Ψ 1 , Ψ 2 , Ψ 3 , Ψ 4 . We say that y is x-regulated with respect to (abbreviated wrt) Ψ 1 Ψ 4 if for every i with ( 1 i k ) we have one of the following cases:
  • y i = x i + i + , where x i + i + Ψ 1 , + is an operation defined for L i and i + is a positive label of the set L G (chosen for L i ).
  • y i = x i + i , where x i + i Ψ 2 , + is an operation defined for L i and i is a negative label of the set L G (chosen for L i ).
  • y i = x i [ l i / x i ] , where l i / x i Ψ 3 and l i L i .
  • y i = x i and x i Ψ 4 .
Example 1.
Suppose a domotic system is composed of the open/closed properties of a window and its degree of openness. For this, we use two sets of labels: L 1 = { on , off } ( open / close states ) and L 2 = { very little , little , normal , much , very much } . As a set of gradient labels L G for L 2 we have
{ NL , NM , NS , 0 , PS , PM , PL }
The normal label denotes a previously established standard minimum aperture. The language contains state formulas such as ( x 1 , x 2 ) , where x 1 refers to the open/closed state of the window and x 2 to the degree of opening of the window. Then the formula
[ ( off , ) ? ; Change ( off , ) { on / 1 , normal / 2 } ] ( on , normal )
indicates that any action consisting of opening the window (initially closed) results in a state in which the window is open with a normal (stipulated or predetermined) degree of aperture. Then, the formula
[ Inc ( on , normal ) { normal + p s : 2 } ] ( on , normal ) ( on , much )
indicates that any action that opens the window a little more will lead to it either remaining within the normal parameter of opening or change to a new state, i.e., to become quite open (this requires us to predefine a matrix where a + operation is handled between the state labels and gradient labels so that normal + PS leads tonormalormuch). The notationnormal+ps:2 indicates that in the second position of the scene (on,normal) its label is replaced by some label resulting from the compositionnormal+ps.
Now, we will express a more complex situation. Let us consider the atoms p , q with the respective meanings “the heating is on" and “it is economically beneficial". The following program (denoted by a) expresses the action of closing the window, and also, while the heating is on, makes sure the window is closed:
( on , ) ? ; Off ( on , ) { 1 } ; ( p ? ; Watch ( off , ) { 1 } ) ; ¬ p ?
Note that ( on , ) ? ; Off ( on , ) { 1 } indicates that if the window is open then it closes, and
( p ? ; Watch ( off , ) { 1 } ) ; ¬ p ?
is an instruction of type <<while>>. Then the formula [ a ] q means that the result of the previous action is always something economically beneficial.

3.3. Semantics

A model  M is a tuple ( W , m ) where W is a nonempty set of states (called, more specifically, domotic states). We will use letters as u , v , w (with or without indexes) as representing states. By convenience, each element u W is to be understood as a domotic state labeled by elements of L.
  • The meaning function m is required to fulfill the following:
    (a)
    m ( p ) W , for every atomic formula p P .
    (b)
    m ( x ) W , for every scene formula x L and m ( x ) .
    (c)
    For all w W there exists a scene formula x L such that w m ( x ) (all the states of a model are described by a scene formula).
    (d)
    For all w W and x L , if w m ( x ) , then x is unique, that is, for all y L different from x (in the sense of Definition 1) we have w m ( y ) .
  • We define now the semantics of the specific program regulator. if x = ( x 1 , , x k ) is a state formula, then
    • m ( Reg x Ψ 1 , Ψ 2 , Ψ 3 , Ψ 4 ) ( m ( x ) )
      { v v m ( y ) and y is x - regulated wrt Ψ 1 - Ψ 4 }
  • Finally, if φ and ψ are formulas and a , b are programs, then we have the following:
    (a)
    m ( φ ψ ) = ( W \ m ( φ ) ) m ( ψ ) ;
    (b)
    m ( ) = ;
    (c)
    m ( [ a ] φ ) = { w W f o r a l l v W , i f ( w , v ) m ( a ) t h e n v m ( φ ) } ;
    (d)
    m ( a b ) = m ( a ) m ( b ) ;
    (e)
    m ( a ; b ) = m ( a ) m ( b ) = { ( w , v ) there exists u W such that ( w , u ) m ( a ) and ( u , v ) m ( b ) } ;
    (f)
    m ( a ) = m ( a ) (reflexive and transitive closure of relation m ( a ) );
    (g)
    m ( φ ? ) = { ( w , w ) w m ( φ ) } .
The semantic concepts of satisfiability, valid in a model, and valid are the usual ones.

4. Formalizing ISWHS

In this section we will express the operation of the system using the programming language of the logic.

4.1. System States

We will use scene formulas with seven state variables ( x 1 , x 2 , x 3 , x 4 , x 5 , x 6 , x 7 ) , where
  • x 1 denotes the temperature of the water accumulated in the accumulator (AT).
  • x 2 denotes the temperature of the water passing through the solar panels (PT).
  • x 3 denotes the status of the cold water solenoid valve of the network to the accumulator (CW).
  • x 4 denotes the status of the solenoid valve in the upper part of the accumulator (A).
  • x 5 denotes the status of the solenoid valve of the lower hot water outlet of the accumulator (HW).
  • x 6 denotes the status of the electrical resistance (ER).
  • x 7 denotes the set point temperature defined by the user (ST).
We will also use “propositional constants” to denote a certain behavior of the system:
  • s i denotes that the water level inside the accumulator reaches the probe of the upper level i ( i = 1 , 2 , 3 ).
The sets of state labels L 1 , , L 7 are as follows:
  • L 1 = L 2 = { vc , c , n , h , vh } .
  • L 3 = L 4 = L 5 = { on , off}.
  • L 6 = { c , n , h } .
  • L 7 = a finite subset of N (to choose).
As gradient labels we have the ones established in the partition of the real line made in Section 3.1, namely, { NL , NM , NS , 0 , PS , PM , PL } . The intuitive meanings of the state labels are vc = v e r y - c o l d ; c = c o l d ; n = n o r m a l ; h = h o t ; vh = v e r y - h o t . We have the following label orders. For L i ( i = 1 , 2 ) : vc c n h vh ; for L j ( j = 3 , 4 , 5 ) : off on ; and for L 6 : c n h .

4.2. Composition Operations

In this section we introduce the composition operations. We start with the table for the gradient labels ( L G ). Recall the partition made in Figure 5, where we consider NL = ( , β ) , PS = ( 0 , α ] , NM = [ β , α ) , 0 = [ 0 ] and PM = ( α , β ] . The L G partition can contain a different numerical set appropriate for each application (a subset of R ). On the other hand, from now on, we will consider that β = 2 α .
In Table 1, the operation + G between qualitative classes yields either a qualitative class or a range of qualitative classes [ X , Y ] (where X Y ), which we express, indicating all the qualitative classes that compose this interval separated by commas for clarity. For example, NS + G PS provide us, as a result, the interval [NS, PS], comprising NS, 0, PS. On the other hand, we used 1 to denote the interval [NL, PL].
The operation + G verifies the following: + G is consistent with the usual real sum +, that is, for all qualitative classes, X , Y , and all x X , y Y , X + G Y corresponds to the smallest interval (in the sense of inclusion) formed by qualitative classes containing x + y (see [19,22]). For example, nm + G PM = [NS, PS].
In Table 1, Table 2 and Table 3, the state labels are translated to gradient labels to make the composition that we make in Table 1. In Table 2 we take vc = nl, c = nm, n = [ns, ps], h = pm, and vh = pl. In Table 3 we take c = [ NL , NM ] , n = [ NS , PS ] , and h = [ PM , PL ] . Once the composition is completed, we translate the result to state labels by choosing the smallest possible interval of state labels. For example, the composition n + 2 PS in Table 3 is, in fact, [ NS , PS ] + G PS = [ NS , PM ] . This result comes from composing, using + G , in each of the classes of the interval [ns, ps] with PS . Now, since the minimum interval in which [ns, pm] is included in terms of the classes in Table 3 is [n, h] = [ns, pl], we finally have this output.
Table 2 describes the behavior of both the water temperature of the solar panels and the water inside the accumulator. The composition Table 3 with the labels of L 6 (Table 2) allows us to calculate both the increase and the gradual decrease of the ER intensity. For instance, we took a scale for L G where α = 5 and β = 10 . Now we consider the following projection of L G over L 1 ( L 2 ) in Table 2: β corresponds to 20 C, α with 25 C, 0 with 30 C, α with 35 C and β with 35 C. Therefore, we have for L G the following partition nl = […, −10), nm = [−10, −5), ns = [−5, 0), [0] = 0, ps = (0, 5], pm = (5, 10], pl= (10, …] and for L 1 ( L 2 ) the corresponding partition very cold = […, 20), cold = [20, 25), normal = [25, 35], hot = (35, 40], very hot = (40, …]. Now, adding, for example, a small number (say 3) to a normal temperature (n) can lead us to stay within that temperature or go to hot (h), depending on how close the system is to the limit 35.

4.3. Logical Description of System Behaviour

The Dom logic can describe the behavior of the system. For instance, let us assume a state where AT > PT, AT < ST, the valves CW, A, and HW are open, and ER has a normal intensity and water level reaches probe 3 (a state perfectly coherent with a correct run of the algorithm for the system). Thus, s 3 and the scene x = ( , , on , on , on , n , ) hold at that state. The procedure establishes then that a new state where the scene y = ( , , on , on , on , h , ) holds must be reached. If we operate gradually, increasing the intensity a little (a small number) until reaching the hot level, the formula
( x s 3 ) [ ( ¬ y ? ; Inc x { 6 + p s : 6 } ) ; y ? ] y
describes this process.

4.4. Detecting Failures in System Operation

In this section we show how our formalism captures what should not happen if we want the system described to work correctly.
We will give some examples of significant failures of the system. We will consider transitions from a state w to a state v, placing below each state some formulas true at it. The failure detected is a trouble with a valve or the resistance. In the following we add new atoms of the type s i j , with the intuitive meaning “the water inside the accumulator is between the level probes i and j”. Now, we list some troubles emphasizing in the scenes only the information more relevant.
The first case in the previous Table 4 states that in the scene x = ( , , , off , , , ) , the component x 2 belongs to a qualitative class lower than the component x 1 . At the state w, the formulas x and s 1 are true. At the state v, the same scenes x and s 12 are true. The program establishes that A should be opened if AT > PT (i.e., x 2 x 1 ). This means that the scene x must vary the component x 4 to on . However, at state v, valve A stays off. After a sufficient lapse of time the water will be between probes 1 and 2, so the situation at v should be a different scene of x, namely, ( , , , on , , , ) . This means that, according to the behavior of the program at this stage, the formula Onoff x { 4 , 5 } , { 3 } ( , , , off , , , ) must be false at w. Therefore, if the procedure for the system is correct, we can suspect a failure in valve A. The rest of the cases are interpreted in a similar way. In general, for these troubleshooting tasks in a graph, model-checking techniques can be applied.

5. Conclusions

The main conclusions of this work are as follows:
  • Efficiency: The proposed solution increases the efficiency of domestic hot water heating systems using renewable energies. Normally, the thermal profitability of this type of installation, powered by solar energy, represents a saving of around 80 % of that required for heating [1]. The use of the system presented in this paper represents an additional saving of ( 100 x ) % (depending on the position x of the lowest level sensor with respect to the bottom of the tank).
  • Multiplicity: The water heater itself has three different behaviors, depending on its load level. In principle, when the solar thermal input is sufficient, it works as a conventional domestic hot water storage tank powered by solar thermal energy. In a second state, when the heat transfer fluid coming from the panels has a lower temperature than the water in the tank to be heated, it cuts off the external supply and becomes atmospheric, allowing the interior water to be used without any possible mixing with the water at a lower temperature from the network. In the third state, when a minimum level is reached, it will behave similar to an electric heater, powered by renewable or non-renewable energies, working on a minimum level of water compared to the original.
  • Economy: The system would allow an estimated global saving of 0.80 × 100 x 100 based on the conventional energy used for the heating process. In addition, it allows to use all the water contained in the tank at the maximum temperature reached (until reaching the minimum load level marked by the probe located in the lowest zone) without mixing it with the water coming from the supply network (which would cool the mixture at a considerable speed). Likewise, when the outside temperature does not allow the stored water to be heated, it considerably reduces the consumption of electrical energy by significantly reducing the volume of water that will be used from that moment onwards (it practically becomes a heating as the water flow passes through).
  • Complexity: The resolution by means of propositional dynamic logic has overcome the disadvantages of traditional systems to detect faults in the logical operation of the system. In addition, it contains programs that allow qualitative control of the states of the variables, with built-in qualitative addition operations, which gives the system great flexibility. This type of operation is very useful in home automation as many applications require qualitative regulation.

6. Patents

In parallel to this paper was developed the patent number ES2627209B2 [32].

Author Contributions

Data curation, F.G.; Formal analysis, A.B.; Methodology, S.M. and J.M.; Software, F.G.; Supervision, A.B.; Writing—original draft, S.M. and J.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Acknowledgments

We thank the University of Malaga and CBUA (funding for open access charge: Universidad de Málaga/CBUA) for the support of this paper, and we thank also the anonymous reviewers whose suggestions helped improve and clarify this manuscript. This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Guzmán, F.; Merino, S. Domótica: Gestión de la Energía y Gestión Técnica de Edificios; RA-MA Editorial: Madrid, Spain, 2015. [Google Scholar]
  2. Kawamura, H.; Naka, K.; Yonekura, N.; Yamanaka, S.; Kawamura, H.; Ohno, H.; Naito, K. Simulation of I–V characteristics of a PV module with shaded PV cells. Sol. Energy Mater. Sol. Cells 2003, 75, 613–621. [Google Scholar] [CrossRef]
  3. Merino, S.; Guzmán, F.; Martínez, J. Metadomotic optimization using genetic algorithms. Appl. Math. Comput. 2015, 267, 170–178. [Google Scholar] [CrossRef]
  4. Moretón, R.; Lorenzo, E.; Navarrete, L. Experimental observations on hot-spots and derived acceptance/rejection criteria. Sol. Energy 2015, 118, 28–40. [Google Scholar] [CrossRef] [Green Version]
  5. Orozco, M.L.; Ramírez-Scarpetta, J.M.; Spagnuolo, G.; Ramos-Paja, C.A. A method for simulating large PV arrays that include reverse biased cells. Appl. Energy 2014, 123, 157–167. [Google Scholar] [CrossRef]
  6. Petrone, G.; Spagnuolo, G.; Zhao, Y.; Lehman, B.; Ramos-Paja, C.A.; Orozco, M.L. Control of Photovoltaic Arrays, Dynamical Reconfiguration for Fighting Mismatched Conditions and Meeting Load Requests. IEEE Ind. Electron. Mag. 2015, 9, 62–76. [Google Scholar]
  7. Orozco-Gutiérrez, M.L.; Spagnuolo, G.; Ramírez-Scarpetta, J.M.; Petrone, G.; Ramos-Paja, C.A. Optimized Configuration of Mismatched Photovoltaic Arrays. IEEE J. Photovolt. 2016, 6, 1210–1220. [Google Scholar] [CrossRef]
  8. Sánchez, F.J.; Sotorrío, P.J.; Heredia, J.R.; Pérez, F.; Sidrach-de-Cardona, M. PLC-Based PV Plants Smart Monitoring System: Field Measurements and Uncertainty Estimation. IEEE Trans. Instrum. Meas. 2014, 63, 2215–2222. [Google Scholar] [CrossRef]
  9. Selen, J.; Adan, I.; Kapodistria, S.; Van Leeuwaarden, J. Steady-state analysis of shortest expected delay routing. Queueing Syst. 2016, 84, 309–354. [Google Scholar] [CrossRef] [Green Version]
  10. Quashing, V.; Hanitsch, R. Numerical simulation of current-voltage characteristics of photovoltaic systems with shaded solar cells. Sol. Energy 1996, 56, 513–520. [Google Scholar] [CrossRef]
  11. Chan, C.; Coghill, G.; Liu, H. Recent advances in Fuzzy Qualitative Reasoning. Int. J. Uncertainty Fuzziness Knowl. Based Syst. 2011, 19, 417–422. [Google Scholar] [CrossRef]
  12. Chavez, G.; Zerkle, D.; Key, B.; Shevitz, D. Relating confidence to measured information uncertainty in qualitative reasoning. In Proceedings of the 2011 Annual Meeting of the North American Information Processing Society, El Paso, TX, USA, 18–20 March 2011; pp. 1–6. [Google Scholar]
  13. Duckham, M.; Lingham, J.; Mason, K.; Worboys, M. Qualitative reasoning about consistency in geographic information. Inf. Sci. 2006, 176, 601–627. [Google Scholar] [CrossRef] [Green Version]
  14. Kuipers, B.; Byun, Y.T. A robot exploration and mapping strategy based on a semantic hierarchy of spatial representations. Robot. Auton. Syst. 1991, 8, 47–63. [Google Scholar] [CrossRef]
  15. Liu, H.; Brown, D.; Coghill, G. Fuzzy qualitative robot kinematics. IEEE Trans. Fuzzy Syst. 2008, 16, 808–822. [Google Scholar]
  16. Mossakowski, T.; Moratz, R. Qualitative reasoning about relative direction of oriented points. Artif. Intell. 2012, 180, 34–45. [Google Scholar] [CrossRef] [Green Version]
  17. Dubois, D.; Ali, A.H.; Prade, H. Making fuzzy absolute and fuzzy relative orders of magnitude consistent. Fuzzy Sets Syst. 2003, 2003, 694–701. [Google Scholar]
  18. Ali, A.H.; Dubois, D.; Prade, H. Qualitative reasoning based on fuzzy relative orders of magnitude. IEEE Trans. Fuzzy Syst. 2003, 11, 9–23. [Google Scholar] [CrossRef]
  19. Agell, N.; Sánchez, M.; Prats, F. Modelos cualitativos de órdenes de magnitud: Introducción a los modelos mixtos. Rev. Iberoam. Intel. Artif. 2000, 4, 58–65. [Google Scholar] [CrossRef]
  20. Dubois, D.; Prade, H. Fuzzy arithmetic in qualitative reasoning. Model. Control. Syst. 1989, 121, 457–467. [Google Scholar]
  21. Travé-Massuyès, L.; Piera, N. The orders of magnitude models as qualitative algebras. Proc. Elev. Ijcai 1989, 2, 1261–1266. [Google Scholar]
  22. Piera, N.; Sánchez, M.; Travé-Massuyès, L. Qualitative operators for order of magnitude calculus: Robustness and precision. In Proceedings of the 13th IMACS World Congress on Computation and Applied Mathematics, Dublin, Ireland, 22–26 July 1991; Volume 22, pp. 1–6. [Google Scholar]
  23. Harel, D.; Kozen, D.; Tyurin, J. Dynamic Logic; MIT Press: Cambridge, MA, USA, 2000. [Google Scholar]
  24. Bonner, J.; Kiffer, J. An overview of transaction logic. Theor. Comput. Sci. 1994, 133, 205–265. [Google Scholar] [CrossRef] [Green Version]
  25. Kowalski, R.A.; Sergot, M.J. A logic–based calculus of events. New Gener. Comput. 1986, 4, 67–95. [Google Scholar] [CrossRef]
  26. McCarthy, J.; Hayes, P.J. Some Philosophical Problems from the Standpoint of Artificial Intelligence. In Machine Intelligence; Meltzer, B., Michie, D., Eds.; Edinburgh University Press: Edinburgh, UK, 1969; Volume 4, pp. 463–502. [Google Scholar]
  27. Pratt, V.R. A near-optimal method for reasoning about action. J. Comput. Syst. Sci. 1980, 20, 231–254. [Google Scholar] [CrossRef] [Green Version]
  28. Goré, R.; Widmann, F. An optimal on-the-fly tableau-based decision procedure for PDL-satisfiability. Lect. Notes Comput. Sci. 2009, 5663, 437–452. [Google Scholar]
  29. De Giacomo, G.; Massacci, F. Combining deduction and model checking into tableaux and algoritms for converse—PDL. Inf. Comput. 2000, 162, 117–137. [Google Scholar] [CrossRef] [Green Version]
  30. Hudstadt, U.; Schmidt, R.A. A comparison of solvers for propositional dynamic logic. In Proceedings of the Second International Workshop on Practical Aspects of Automated Reasoning (PAAR-2010), Edinburgh, UK, 14 July 2012; Volume 9, pp. 63–73. [Google Scholar]
  31. Lange, M. Model checking propositional dynamic logic with all extras. J. Appl. Log. 2006, 4, 39–49. [Google Scholar] [CrossRef] [Green Version]
  32. Burrieza, A.; Guzmán, F.; Martínez, J.; Merino, S. Acumulador, Sistema y Procedimiento Para Proporcionar Agua Caliente Sanitaria. Patent ES2627209B2, 31 March 2017. [Google Scholar]
Figure 1. Components description.
Figure 1. Components description.
Sensors 22 03899 g001
Figure 2. Functioning scheme 1.
Figure 2. Functioning scheme 1.
Sensors 22 03899 g002
Figure 3. Functioning scheme 2.
Figure 3. Functioning scheme 2.
Sensors 22 03899 g003
Figure 4. Functioning scheme 3.
Figure 4. Functioning scheme 3.
Sensors 22 03899 g004
Figure 5. Partition of real line in qualitative classes.
Figure 5. Partition of real line in qualitative classes.
Sensors 22 03899 g005
Table 1. Composition of components of L G .
Table 1. Composition of components of L G .
+ G NLNMNS0PSPMPL
nlnlnlnlnlnl, nmnl, nm, ns1
nm nlnl, nmnmnm, nsns, 0, psps, pm, pl
ns nm, nsnsns, 0, psps, pmpm, pl
0 0pspmpl
ps ps, pmpm, plpl
pm plpl
pl pl
Table 2. Composition of components of L 1 ( L 2 ).
Table 2. Composition of components of L 1 ( L 2 ).
+ 1 NLNMNS0PSPMPL
vcvcvcvcvcvc, cvc, c, n1
cvcvcvc, ccc, nnn, h, vh
nvc, cvc, c, nc, nnn, hn, h, vhh, vh
hvc, c, nnn, hhh, vhvhvh
vh1n, h, vhh, vhvhvhvhvh
Table 3. Composition of components of L 6 .
Table 3. Composition of components of L 6 .
+ 2 NLNMNS0PSPMPL
cccccc, nc, n1
ncc, nc, nnn, hn, hh
h1n, hn, hhhhh
Table 4. Scenes and States.
Table 4. Scenes and States.
Scene Formula xwvTrouble
x 4 = off , x 2 x 1 x , s 1 x , s 12    A
x 5 = off , x 2 x 1 x , s 1 x , s 12    HW
x 3 = on , x 2 x 1 x , s 2 x , s 12    CW
x 2 x 1 , x 7 x 1 , x 6 = n x , s 3 y , s 2 (where y 6 c )   ER
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Merino, S.; Burrieza, A.; Guzman, F.; Martinez, J. Smart Sensorization Using Propositional Dynamic Logic. Sensors 2022, 22, 3899. https://doi.org/10.3390/s22103899

AMA Style

Merino S, Burrieza A, Guzman F, Martinez J. Smart Sensorization Using Propositional Dynamic Logic. Sensors. 2022; 22(10):3899. https://doi.org/10.3390/s22103899

Chicago/Turabian Style

Merino, Salvador, Alfredo Burrieza, Francisco Guzman, and Javier Martinez. 2022. "Smart Sensorization Using Propositional Dynamic Logic" Sensors 22, no. 10: 3899. https://doi.org/10.3390/s22103899

APA Style

Merino, S., Burrieza, A., Guzman, F., & Martinez, J. (2022). Smart Sensorization Using Propositional Dynamic Logic. Sensors, 22(10), 3899. https://doi.org/10.3390/s22103899

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop