Next Article in Journal / Special Issue
Optimization of Switch Allocation Problems in Power Distribution Networks
Previous Article in Journal
Blossom: Cluster-Based Routing for Preserving Privacy in Opportunistic Networks
Previous Article in Special Issue
Supervisory Layer for Improved Interactivity of Distributed Generation Inverters with Smart Grids
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Knowledge-Based Battery Controller for IoT Devices

by
Joaquin Canada-Bago
* and
Jose-Angel Fernandez-Prieto
Telecommunication Engineering Department, University of Jaén, 23071 Jaén, Spain
*
Author to whom correspondence should be addressed.
J. Sens. Actuator Netw. 2022, 11(4), 76; https://doi.org/10.3390/jsan11040076
Submission received: 12 October 2022 / Revised: 17 November 2022 / Accepted: 17 November 2022 / Published: 21 November 2022
(This article belongs to the Special Issue Smart Grids: Sensing and Monitoring)

Abstract

:
Internet of things (IoT) devices are often located in difficult-to-access places without connection to the electrical grid. For this reason, some IoT devices usually incorporate a small stand-alone photovoltaic (PV) system to power only the IoT device. However, several IoT applications involve using other components, such as instrumentation, electrical motors, lighting bulbs, etc., which require additional electrical power. The objective of this study was to design and implement a battery controller integrated into a constrained resource device that allows powering not only other components of the IoT application but also the IoT device. In this way, the IoT device controls and monitors the PV system and executes other IoT applications such as lighting. Results show that the designed controller exhibits efficient behavior when compared with other regulators and can be integrated into resource-constrained devices, improving the life of batteries and reducing cost.

1. Introduction

The internet of things (IoT), a term coined by Kevin Ashton in 1999, describes physical objects that can sense their environment, process data, act on the environment, and communicate data to cloud or fog platforms in which data can be shown and analyzed [1]. Within all IoT applications, the following topics can be addressed: environmental measurements, smart buildings, smart agriculture, industrial control, health monitoring, smart cities, etc.
Diverse IoT applications involve locating devices in remote and difficult-to-access locations without the possibility of using the electrical grid. For this reason, some IoT devices incorporate a small photovoltaic (PV) system that can power only the IoT device.
However, many IoT applications require an increased electrical storage capacity to power the IoT device and to power other application components, such as instrumentation, lighting components, motors, electrical powered sensors, etc. Other IoT applications must operate without interruption due to cloudy days. Thus, the use of a complete stand-alone PV system with sufficient electrical storage would incorporate other components into the IoT application and increase the IoT device lifetime.
Stand-alone PV systems [2] generate and store electrical energy and are typically located in places in which there is no access to the electrical grid. These systems are composed of a PV generator, a battery, a charge regulator, an inverter, and loads. The charge regulator controls the charge and discharge processes, protecting the battery. Although it is possible to use an independent charge regulator, the integration of the control of charge and discharge processes in IoT devices would reduce the costs of these devices.
Because a high degree of imprecision and uncertainty is observed in the control of real PV systems, this study used a stand-alone PV system with a fuzzy rule-based system (FRBS) [3], which is well adapted to this scenario. FRBSs are based on fuzzy logic (FL) and are considered knowledge-based systems that can be essential components of artificial intelligence (AI) technologies. In these systems, control knowledge is based on a knowledge base (KB) that incorporates a set of linguistic variables, a set of gradual membership functions defined in each variable and a set of IF–THEN rules that relate the variables of the system. Recently, IoT and AI technologies have been applied to PV systems to monitor variables, control systems, analyze data, obtain characteristic I-V curves, and reduce consumption, etc., which will be presented in Section 2.
The objective of this study was to design and implement a battery controller integrated into a constrained resource device that allowed powering not only other components of the IoT application but also the IoT device.
To control battery charging and discharging, FRBSs are proposed.
The contributions of this study include the following:
  • A new FRBS battery controller based on expert knowledge has been designed and implemented;
  • Several experiments have been performed in a PV testbed that verify the correct operation of the controller;
  • An FRBS controller, which is adapted to resource-constrained devices, has been designed and implemented;
  • Several experiments intended to analyze the performance of the FRBS controller in resource-constrained devices have been performed;
  • A new real lighting IoT application that includes a battery controller and reduces the cost of IoT devices has been designed and implemented.
The remainder of this paper is organized as follows. Section 2 provides an introduction to the IoT, stand-alone PV systems, FRBSs, and different existing studies that apply IoT and AI to PV systems. Section 3 shows the methods used in this study, including the structure of the stand-alone PV controllers and their KBs, including variables, membership functions, and rules. In addition, the aspects of integrating controllers into IoT devices are presented. Section 4 shows the experimental results obtained to verify the behavior of controllers and their performance when they are built into a resource-constrained device. Then, the IoT real application is presented, in which the evolution of battery voltage is monitored on the platform. Finally, conclusions are drawn in Section 5.

2. Related Technologies and Work

This section contains an introduction to the IoT, stand-alone PV systems, and FRBSs. Finally, several works proposing the use of IoT, FL, and AI in PV systems are presented.

2.1. Internet of Things

The IoT concept was coined by Kevin Ashton in 1999 as a system in which the physical world is connected to the internet using ubiquitous sensors. Currently, the IoT [1,4,5,6] is a concept that refers to obtaining data and acting in the environment through constrained resource devices, communications that allow the storage of data on cloud and fog servers, and subsequent analysis of the stored data. There are many IoT applications, including environmental measurements, fire detection, smart buildings, smart agriculture, industrial control, logistics, health monitoring, smart cities (traffic, lighting, parking location, containers, etc.).
The IoT concept encompasses different components, such as constrained resource devices, networks, protocols, and platforms [6]. Constrained resource devices can sense their environment, process information and make decisions, act in their environment, and communicate data to fog or cloud platforms. They can operate without (WaspMote, Arduino) or with (Raspberry) an operating system. Regarding IoT communications, specific networks [6] (IEEE 802.15.4, ZigBee, Wireless Sensor Networks (WSN), Sigfox), network protocols (Long Range Modulation (LoRa), Long Range Modulation Wide Area Networks (LoRaWAN)), and application protocols (Message Queue Telemetry Transport (MQTT) [7], Constrained Application Protocol (CoAP) [8]) have been designed. Currently, many connected IoT devices provide large amounts of data, which has led to the use of cloud computing.
Cloud computing [6] is a technology that enables large-scale computing, eliminating the need to maintain expensive hardware and software, as well as having a dedicated space. The advantages of cloud computing include virtualized resources, parallel processing, service integration, and data storage. In this context, cloud computing systems such as OpenStack [9] and server virtualization environments such as Proxmox Virtual Environment [10] have been proposed.
Different platforms in the cloud have been designed to provide services to IoT projects, such as management of IoT devices, connectivity through different communications protocols, storage and management of data measured by sensors, graphical representation of the temporal evolution of data, and data analysis and processing. As a result, these platforms allow remote monitoring of data obtained by devices in IoT projects.
Fog computing [11,12] is a new paradigm that is based on moving computing and network services from the cloud to the edge of the internet. Thus, IoT devices will use nearby servers in the fog, which could use servers in the cloud located anywhere on the internet. These are therefore intermediate services and servers very near IoT devices.
Some of the benefits of fog computing are the following:
  • Distributed data storage;
  • Hierarchical processing of data in the fog, local data analysis that allows the reduction of the volume of transmitted data to the cloud and reduction of storage and transmission costs;
  • Quality of service that allows the prioritization of data from delay-sensitive applications (e.g., industrial control or alarms);
  • Performing complex tasks, which IoT devices may not support on fog servers, increasing the possibilities of these applications;
  • Uninterrupted services because intermittent access to the cloud would not affect the application;
  • Latency reduction because communications between devices in the fog are faster and, conversely, the volume of data to be sent to the cloud is reduced;
  • Improved security because servers in the fog can act as firewalls and thus protect devices that do not have sufficient capacity to execute encryption and authentication algorithms.
Frequently, IoT applications involve locating IoT devices in places that are difficult to access without power supplies from the traditional electrical network. To increase device design life, different sleep modes are used, which allows devices to have a long operating life when paired with low power consumption. In addition, some IoT devices incorporate a small PV system that allows powering the IoT device.
However, in applications with higher electricity consumption (e.g., lighting and environmental instrumentation), a greater electrical storage capacity is necessary. In these applications, an alternative power source, such as stand-alone PV systems, is important.
In [13], the authors propose different energy sources, among which PV power and battery storage stand out. Off-grid power supply is identified as one of the 10 research topics in the IoT in [14].

2.2. Stand-Alone PV Systems

Currently, PV systems, which convert solar energy into electrical energy, are an interesting area of research because they are renewable energy with practically unlimited resources and without damaging effects or impacts on the environment. There are basically two types of PV systems: grid-connected and stand-alone. Grid-connected PV systems inject generated electricity into the grid to be immediately consumed in any location connected to the grid, while stand-alone PV systems operate independently without connection to the grid and have batteries that store the generated energy, adapting the generation and consumption periods. Stand-alone PV systems are typically installed in places where grid connections are not possible, such as remote areas.
Although different configurations can be used in the design of a stand-alone PV system, PV systems typically consist of a PV generator, batteries, a charge regulator, an inverter and loads [2,15]. The PV generator, which is composed of a set of PV cells, converts the solar energy into electricity (direct current) that can be consumed immediately or stored in batteries to be consumed later. The regulator controls the charging and discharging processes to protect the battery. Although some loads can be powered directly by direct current (DC), if they require alternating current, an inverter is necessary because the generator produces direct electricity. Figure 1 shows the structure of a typical stand-alone PV system.
To monitor, evaluate performance, and detect fault occurrences in PV systems, different PV monitoring systems have been proposed that typically consist of sensors, data acquisition, data transmissions, and data storage and analysis. In [16], the authors present a comprehensive review of PV monitoring systems. In the following sections, PV monitoring systems, which are based on IoT, are presented.
The PV generator converts incident solar energy into electricity. To obtain a desired power output, the PV generator typically consists of an array of PV modules that are composed of an interconnection of PV cells. The power output of a PV generator is variable and depends on multiple factors, such as solar irradiance, cell temperature or incidence angle. Thus, the measure of the peak watts is used and describes the output power under standard test conditions (solar irradiance = 1000 W/m2, solar reference spectrum = AM 1.5, and cell temperature = 25 °C). Figure 2 shows the I–V curve of a PV generator in diverse solar irradiances (1000, 800, and 600 W/m2, and 25 °C).
The regulator, or charge controller, is an important component of a stand-alone PV system because it controls the power in the system. Currently, the regulator’s primary objective is to protect the battery from overcharging and overdischarging, increasing its lifetime. Other aspects, such as the reliability of the system, performance, and maintenance of the system, also depend on the regulator.
Charge regulators or controllers [2] are generally classified as constant current or constant voltage controllers, for which they can use different stages (series, shunt or compound). To regulate the battery charge, MOSFET transistors are used on which a pulse width modulation (PWM) signal is applied. Conversely, DC-DC systems are used to harvest the maximum power from the PV generator and use maximum power point tracking (MPTT) [17]. In [18], different MPTT controllers are presented. A comparison between both controllers is presented in [2]. PWM-based regulators are the simplest and most effective means of achieving constant voltage battery charging by adjusting the duty ratio of the MOSFETs. MPTT regulators are more complex and expensive, and are more efficient at low temperatures.
In stand-alone PV systems, automotive lead-acid batteries are primarily used due to their low cost and availability. This type of battery is designed for starting, lighting, and ignition (SLI), and although automotive batteries are not designed for deep cycles, they are universally available and have the lowest initial cost of available options. The primary feature of a lead-acid battery is its nominal capacity, which is typically given in Ah. The state of charge (SOC) shows the available capacity and is expressed as a percentage of the nominal capacity, while the depth of discharge (DOD) shows the withdrawn energy and is also expressed as a percentage of the full capacity. The charge rate is the current applied to a battery to restore its charge and is normalized to the nominal capacity and a period of time that is typically 10 h. Therefore, the charge rate of a 100 Ah battery over 10 h is I10 = 10 A, and the charge rate over 20 h is I20 = 5 A.
During charging, the charge acceptance of a battery depends on the charging rate, temperature, age of the battery, and previous DOD. At the beginning of charging, the charge rate can be high to increase the SOC as quickly as possible, but when the battery reaches a high SOC, the charge rate must be steadily reduced. A small overcharge has a good effect because it causes gassing, which mixes the electrolyte and prevents the stratification of the electrolyte, which provokes sulfation, which reduces the battery’s capacity. Conversely, if overcharging continued, the battery would lose capacity due to a loss of water and active material, and the degradation of the plates, reducing its lifetime. Battery temperature has an important impact on capacity and charge voltage. The charging process is more efficient at higher temperatures than lower temperatures, and although the relationship between capacity and temperature is not linear, a relationship of 1%/°C is primarily used. As the nominal capacity of lead-acid batteries is given at 25 °C, the capacity increases above 25 °C and decreases below this temperature. The charging voltages must be compensated by −5 mV/°C/cell, reducing the charging voltage at temperatures above 25 °C and increasing it below this temperature. Without this temperature compensation, the battery will not be completely charged at low temperatures and will be overcharged at high temperatures. As batteries age, their internal resistances grow, and therefore, it is necessary to increase the charging voltage or time.
During discharging, the capacity of batteries depends on the discharge rate and the temperature. The higher the discharge rate or current is, the lower the capacity that can be withdrawn from a battery. It is important to avoid deep discharges because if a deep discharge is kept for a long time, it will provoke sulfation, reducing the battery’s capacity.
Although different algorithms or control strategies have been proposed, most are based on the calculation of the SOC of the battery, which divides the charging process into three stages (bulk, absorption, and float) and does not allow a discharge under a minimum threshold of charge. The objective of the bulk stage is to obtain a high level of charge as soon as possible; thus, the charge regulator acts as a current source and full generator current is used for charging. To avoid overcharging, this stage ends when the battery voltage reaches a maximum voltage (bulk voltage). In the next stage, the absorption stage, the charge regulator acts as a voltage source, keeping the battery voltage constant and controlling the charge current. The absorption stage is performed during a short period of time in which the high voltage of the battery causes gassing, mixes the electrolyte, and prevents sulfate build-up on the plates. Then, the float stage begins, and the regulator allows the battery’s voltage to decrease to the float voltage, keeping the battery voltage constant to ensure that the battery completely charges. Figure 3 shows the three stages of a charging process.
The development and incorporation of new control technologies into regulators could improve the performance of PV systems and also increase the lifetime of batteries. Because the available knowledge about the charging and discharging process is somewhat imprecise, vague, and uncertain, FRBSs are technologies that can successfully adapt to the control of stand-alone PV systems.

2.3. Fuzzy Rule-Based Systems

One of the most important applications of FL [19] is FRBSs [3]. In this type of system, which is considered a knowledge-based system, FL is used to represent different forms of knowledge; therefore, they can manage uncertain and vague knowledge, which is characteristic of human reasoning.
In FRBS, the knowledge of the system is based on a set of linguistic variables, a set of gradual membership functions defined for each variable, and a set of IF-THEN rules that relate the variables of the system. The variables of the system, which are identified using linguistic terms, must be defined for each application. To define a variable, it is necessary to normalize its range of crisp values using a scaling function, divide its normalized universe of discourse into a reasonable number of partitions, and associate a membership function, which also uses a linguistic term, with each partition. Although membership functions can be defined with different shapes, triangular or trapezoidal shapes are typically used. The relations among the variables of the system are established by rules. In this type of system, IF-THEN rules are typically used and are composed of a few antecedents and one consequent. The antecedents, which comprise associations among variables and their defined membership function, are related using AND operators. With regard to the consequent, two types of FRBS have been proposed: Mamdani [20,21] and TSK [22]. While the former use linguistic labels in the consequent, the latter propose that the consequent use a function of the input variables.
The basic structure of a Mamdani FRBS is composed of a KB, an inference engine, and fuzzification and defuzzification interfaces. The KB of the system contains the available knowledge about the problem and is composed of the data base (DB) and the rule base (RB). While the DB encompasses the definition of variables, scaling functions, and membership functions associated with each variable, the RB contains the rules of the system. The objective of the inference engine is to infer the output of the system using input variables and the KB. The fuzzification and defuzzification interfaces transform the crisp values of variables into normalized values and vice versa.
The primary features of a KB are completeness, consistency, and interpretability. While completeness means that the systems have knowledge for every input to infer an output, consistency involves not having conflicting rules, which propose different consequents with the same antecedents. An important aspect in FRBS is to define interpretable fuzzy partitions that should satisfy several conditions: to define a small number of membership functions and labels, to relate linguistic terms with fuzzy sets without ambiguity, to cover the entire universe and to use normal and convex membership functions. Conversely, it is recommended that, for every point of the universe, the sum of all membership functions should be equal to one.
Acquiring knowledge is an important step in FRBS. The simplest way to obtain the knowledge is to acquire it from an expert who can propose variables, membership functions and relations among variables. Conversely, knowledge can be obtained from experimental data or using a combination of expert and extracted data knowledge. Some applications require adapting their knowledge to new conditions or acquiring new knowledge. In these scenarios, an evolutionary algorithm is used to evolve the knowledge and obtain a better solution. In the case of FRBS, diverse hybrid technologies composed of FRBS and an evolutionary algorithm (e.g., genetic algorithm) have been proposed [3].

2.4. IoT and AI in PV Systems

Recently, both IoT and AI technologies have been applied to PV systems.
A typical application of IoT in PV systems is real-time monitoring of important variables [23,24,25,26]. These systems allow data to be obtained using sensors; communicate data to fog and cloud platforms; store and visualize the obtained data; and perform data analysis that allows, for example, the early detection of failures.
Conversely, to obtain the characteristic I–V curves of PV, in [27], the authors propose using various components of IoT systems. In this study, the authors propose automating some tasks: load sweep, data acquisition, communication, data storage, and visualization.
The use of smart devices in the IoT has been widely referenced in European Commission documents related to the IoT and the internet of the future for more than a decade [28,29]. In these documents, devices called smart things are presented in which algorithms can be executed for making intelligent decisions based on real-time measurements of the sensors.
Different AI technologies have been proposed for applications in PV systems. In [30], the authors presented a fuzzy controller for stand-alone PV systems. In [31], the authors presented several technologies (e.g., neuronal networks, deep learning, metaheuristic-based) that can be applied to PV systems. In [32], the authors proposed using machine learning and deep learning to obtain output energy forecasts and to reduce energy consumption. FL has been used to execute different MPTT algorithms [17,33,34].
Conversely, both IoT and AI have been used together in PV systems. In [35], the authors presented different studies related to forecasting, control, energy management, fault location, modeling, energy generation prediction, anomaly detection, and MPTT algorithms. A high-concentration PV tracker controlled by an FRBS system executed in a constrained resource microcontroller and monitored by an IoT system is presented in [36].
Different challenges, recommendations and future directions according to the use of AI and IoT are presented in [37], among which it is worth highlighting the following: cost-effective-based embedding, including AI and IoT, remote sensing, fault detection and diagnosis.

3. A Knowledge-Based Battery Controller for IoT Devices

This study proposes the design and implementation of an IoT system that consists of the real-time control and remote monitoring of a stand-alone PV system integrated into a constrained-resources IoT device with sufficient processing information capacity to execute other IoT applications such as lighting, improving the life of batteries and the cost of these systems. The design has been performed considering that the system allows incorporating the available expert knowledge in such a way that it can be easily interpretable and that the designed system can be executed in a small microcontroller or sensor with low capacity to process information.
This section shows the stand-alone PV system and the charging and discharging FRBS controllers defined using their structures, variables, membership functions, and rules.

3.1. Stand-Alone PV System Controller

Figure 4 shows the interconnections between the controller and the remaining components of the stand-alone PV system. The controller uses four input variables—current generated (Igen) by the PV array, current consumed by the loads (Iloa), battery voltage (Vbat), and battery temperature (Temp)—and two output variables—flow of current generated (FIgen) and flow of current consumed (FIloa).
To ensure that the FRBS knowledge is easy to understand, two complete FRBSs are designed: a structured controller with different KBs to control the charging process, and a simple FRBS to control the discharge process. The KBs are simple and composed of a reduced set of variables, a few membership functions defined in each variable, and a reduced set of rules, which have a few antecedents. Conversely, a few membership functions, variables, and rules allow the fuzzy controller to be run on a constrained-resource microcontroller or sensor.
The following sections describe the structured charge controller and the discharge controller in detail.

3.2. Structured Charge Controller

As previously stated, the available knowledge about the control of stand-alone PV systems is primarily focused on protecting batteries from overcharging and overdischarging, and is frequently based on the computation of the SOC of batteries.
In this design, the charging process is based on the computation of the SOC of the battery, age of the battery, and previous DOD, and includes the following features:
  • Charging process based on different stages: bulk, absorption, and float, protecting the battery from overcharges;
  • Inference of regulation voltages, absorption time, and increments of regulation voltages using different FRBS;
  • Temperature compensation for the absorption and float voltages and the duration of the absorption stage;
  • Age compensation on absorption and float voltages and duration of absorption stage;
  • Previous DOD (PDOD) compensation on absorption and float voltages and the duration of the absorption stage.
To describe the charge controller, this subsection presents its structure, the involved variables, their physical ranges, the way in which the variable is determined (e.g., measured, calculated, or inferred from an FRBS), the membership functions defined in the universe of discourse of every variable, and the rules of the KBs used in the fuzzy systems.
Figure 5 shows the structure of the charge controller, which uses four input variables (Igen, Iloa, Vbat, Temp) and one output variable (FIgen), and is composed of three FRBS blocks.
The input variables that the charge controller can directly measure are: (1) the current generated by the PV array; (2) the current consumed by the loads; (3) battery voltage; and (4) battery temperature.
Conversely, we must either infer or calculate the other variables because they form the basis of knowledge about the charging process. The knowledge-based systems allow the charge controller to infer the regulation voltage (Vreg), the increment of regulation voltage (Incre), and the absorption stage time (AST). Other variables including SOC of battery, age of battery (Age), previous depth of discharge (PDOD), percentage of absorption stage (%AS), and objective voltage (Vobj) are also calculated.
The output variable is the flow of generated current (FIgen).
The physical range of the variable temperature is [0, 50] °C, which is represented by the universe of discourse in the range [0, 1], where three triangular-shaped membership functions have been defined {low, medium, high}, as shown in Figure 6, where the x-axis shows crisp values (real values) and fuzzy values (normalized values) that are obtained after the fuzzification interface.
The SOC of the battery shows the available capacity as a percentage of the nominal capacity and is obtained by computing the generated and consumed currents, considering the nominal capacity, temperature, performance of the charging rate, and the capacity at the discharge rate. Figure 6 shows how two membership functions {low, high} have been defined in the universe of discourse, which represents the domain [0, 100]%.
The variable age is calculated using the number and depth of cycles of charge and discharge, which computes the number of low, medium, and deep discharges. Two triangular-shaped membership functions {new, old} have been defined in the universe representing batteries ranging from new (real capacity equal to nominal capacity) to old batteries with loss of capacity (real capacity less than 80% of nominal capacity).
The variable PDOD indicates the percentage of charge that has been withdrawn from the battery in the previous cycle of charge and discharge. Two fuzzy sets {low, high} have been defined in the domain.
The variable AST is the time during which the absorption stage will be performed in the next cycle of charge. The physical range of the AST variable is [20, 60] minutes, which is represented by the universe of discourse in the range [0, 1], where five triangular-shaped membership functions have been defined {very low, low, medium, high, very high}, as shown in Figure 6.
The value of the variable AST is inferred from an FRBS that includes the KB with the following rules about the absorption stage:
IF (Temp is low) and (Age is new) and (PDOD is low) THEN (AST is medium)
IF (Temp is low) and (Age is new) and (PDOD is high) THEN (AST is high)
IF (Temp is low) and (Age is old) and (PDOD is low) THEN (AST is high)
IF (Temp is low) and (Age is old) and (PDOD is high) THEN (AST is very high)
IF (Temp is med) and (Age is new) and (PDOD is low) THEN (AST is low)
IF (Temp is med) and (Age is new) and (PDOD is high)THEN (AST is medium)
IF (Temp is med) and (Age is old) and (PDOD is low) THEN (AST is medium)
IF (Temp is med) and (Age is old) and (PDOD is high) THEN (AST is high)
IF (Temp is high) and (Age is new) and (PDOD is low) THEN (AST is very low)
IF (Temp is high) and (Age is new) and (PDOD is high) THEN (AST is low)
IF (Temp is high) and (Age is old) and (PDOD is low) THEN (AST is low)
IF (Temp is high) and (Age is old) and (PDOD is high) THEN (AST is medium)
To prevent overcharging, it is necessary to limit the time during which the battery is in the absorption stage, whose maximum is indicated by the absorption stage time variable. The variable %AS, which is being performed in the current cycle of charge, is calculated from the variables Vbat and AST. In this variable, two fuzzy sets {low, high} have been defined.
The Vreg variable shows the voltage of each stage of the charging process. Its physical range is [10, 16] v, which is represented by its universe of discourse in the range [0, 1], where two membership functions {float, absorption} indicate the voltage of two different stages in the charging process. This variable is inferred from an FRBS that includes knowledge of the different stages and therefore indicates the change in each stage of the charging process. Vreg is inferred from an FRBS that includes a KB with the following rules:
IF (SOC is low) and (%AS is low)THEN (Vreg is absorption)
IF (SOC is low) and (%AS is high)THEN (Vreg is float)
IF (SOC is high)THEN (Vreg is float)
The variable Incre shows the increment or decrement of the regulation voltage, which is applied to each stage of the charging processes to compensate for the effects of temperature, age, and previous depth of discharge. The physical range of the increment variable is [−0,6, 0,6] v, and five fuzzy sets have been defined in the universe {very negative, negative, zero, positive, very positive}. The increment of the regulation voltage is inferred from an FRBS that includes a KB about these compensations.
IF (Temp is low) and (Age is new) and (PDOD is low)THEN (Incre is positive)
IF (Temp is low) and (Age is new) and (PDOD is high)THEN (Incre is very positive)
IF (Temp is low) and (Age is old) THEN (Incre is very positive)
IF (Temp is med) and (Age is new) and (PDOD is low)THEN (Incre is zero)
IF (Temp is med) and (Age is new) and (PDOD is high)THEN (Incre is positive)
IF (Temp is med) and (Age is old) and (PDOD is low)THEN (Incre is positive)
IF (Temp is med) and (Age is old) and (PDOD is high)THEN (Incre is very positive)
IF (Temp is high) and (Age is new) and (PDOD is low)THEN (Incre is negative)
IF (Temp is high) and (Age is new) and (PDOD is high)THEN (Incre is zero)
IF (Temp is high) and (Age is old) and (PDOD is low)THEN (Incre is zero)
IF (Temp is high) and (Age is old) and (PDOD is high)THEN (Incre is positive)
The variable Vobj is the voltage at which the charge controller has to keep the battery and is composed of the regulation voltage and the increment or decrement due to compensations.
Finally, the output of the charge controller is the variable FIgen, which will be inserted into the battery. To reach the objective voltage, the controller operates over the flow of generated current using a signal with PWM applied to a field effect transistor (FET). If the battery voltage exceeds the objective, the controller will decrease the flow of the generated current. Conversely, if the battery voltage does not reach the objective, the controller will increase the flow. To avoid oscillations in the battery voltage, particularly when the state of charge of the battery is high, a differential delayed system is used by the controller.
In this scheme, input and output interfaces only use linear conversions, where a first infer then aggregate (FITA) inference approach is used. In the inference of each rule, the minimum output variable membership function is selected. The final inference is calculated as the center of sums of the output variable membership function that have been selected.

3.3. Discharge Controller

The primary objective of the discharge controller is to protect the battery from overdischarging, which can provoke sulfation, reducing the battery’s capacity. The discharge process is based on the computation of the SOC of the battery and includes protection with the aim that the battery voltage does not decrease under a minimum value.
To describe the discharge controller, this subsection presents the involved variables, their physical ranges, the methods that can be used to determine the variable (e.g., measured, calculated or inferred from an FRBS), the membership functions defined in the universe of discourse of every variable, and the rules of the KBs used in the fuzzy system.
In this discharge controller, the interest ranges of variables SOC and VBat are different than in the charging controller; thus, these variables have different membership functions. During charging, the charge controller must know when the SOC is lower than 90%; during discharging, the discharge controller must differentiate when the SOC is lower than 40%. Therefore, the variable SOC has different membership functions because the discharge controller must differentiate other situations. With regard to the variable VBat, two different membership functions, which identify a lower voltage threshold, have been defined. Figure 7 shows the membership functions defined in each variable for the discharge controller, where x-axis shows crisp values (real values) and fuzzy values (normalized values) that are obtained after the fuzzification interface.
The discharge controller uses four input variables and one output variable. The input variables that the discharge controller can directly measure are the current generated by the PV generator, the current consumed by the loads, battery voltage, and battery temperature. Conversely, it is necessary to calculate the value of the SOC of the battery and infer the output variable, which is the flow of consumed current (FIgen).
The variable Vbat is directly measured from the system, and although its physical range is [10, 16] V, only two fuzzy sets have been defined {under11v, over11v} because the battery voltage should not decrease under the threshold of 11 V.
The SOC of the battery shows the available capacity expressed as a percentage of the nominal capacity and is obtained by computing the generated and consumed currents, considering the nominal capacity, temperature, performance of the charging rate, and the capacity at the discharge rate. Two trapezoidal-shaped membership functions {under40%, over40%}, which overlap in the range [30, 50]%, have been defined in the universe of discourse, which represents the domain [0, 100]%.
The output of the discharging system controls the flow of consumed current, which is consumed by the loads. In this variable, two fuzzy sets {ON, OFF} have been defined. The discharge controller allows the loads to consume electrical current if the output is ON; otherwise, consumption is not allowed. The output variable is inferred from an FRBS that includes a KB with the following rules:
IF (Vbat is over11v) and (SOC is over40%)THEN (FIloa is ON)
IF (Vbat is over11v) and (SOC is under40%)THEN (FIloa is OFF)
IF (Vbat is under11v)THEN (FIloa is OFF)

3.4. Integration of Battery Controller in an IoT Device

The IoT application proposed in this study is composed of IoT devices powered by batteries, a wireless communication network, a communication protocol, and a platform on the internet where data are stored and monitored. In this scenario, a complete FRBS has been designed and implemented in C language to be executed in an IoT device.
To integrate the designed FRBS charge and discharge controllers into a resource-constrained IoT device and reduce the computational burden, this study proposes several modifications to the Mamdani approach. KBs are defined based on expert knowledge using linguistic labels, variables, membership functions, and rules. The number variables, membership functions defined in each variable (only triangular or trapezoidal shapes), and rules should be short because the KB will be executed in an IoT device. The linguistic labels defined in the KB are then translated to numerical values and transmitted to the IoT device, which executes a small but complete FRBS. In this scheme in the IoT device, input and output interfaces only use linear conversions, and the inference engine works with numerical variables, fuzzy sets, and rules instead of linguistic labels, where a FITA inference approach is used. In the inference of each rule, the minimum output variable membership function is selected. The final inference is calculated as the center of sums of the output variable membership function that have been selected.
Thus, it is possible to change the KB that is executed in the IoT device, allowing change of the controller behavior and, for example, the battery type.

4. Results

This section shows the experimental descriptions and the obtained results in the two experiments that have been performed. The objective of the former experiment that was performed in a PV testbed was to verify the behavior of the designed controller and compare it with others: a simple controller and a high-quality commercial charge regulator. The latter experiment, which was performed in a real IoT application, analyzed the performance of FRBS controllers executed in a resource-constrained device, defined the components of the application, and showed the behavior of controllers using the evolution of battery voltage in the platform.

4.1. Comparison of Features between Different Controllers in Real Stand-Alone PV Systems

The objective of this experiment was to compare the behavior and results of different controllers with the proposed knowledge-based controller. To compare these features, they were performed in three identical real stand-alone PV systems in which the only difference was the controller of each PV system; thus, each controller operated a PV system. The experiment consisted of daily charge and discharge cycles during several periods of approximately a month.

4.1.1. Physical Stand-Alone PV Systems

To compare the results, features, and behaviors of different charge controllers, three real stand-alone PV systems were installed at the University of Jaen.
The stand-alone PV systems were practically identical with the same PV generators, batteries, loads, wires, etc., but the charge controllers were different. The PV modules had a nominal power of 106 W ± 5% under standard conditions: 1000 W/m2 irradiance at a spectral distribution of air mass (AM) 1.5 and a 25 °C PV cell. The PV modules were installed near each other in the same plane to obtain the same conditions (irradiance and temperature). In these tests, automotive SLI batteries (12 V 70 Ah) from different manufacturers were used. With regard to loads, a nominal 12 V 35 W load was used in each stand-alone PV system, with a nightly consumption of 3 h in the first experiment and 4 h in the second experiment. The first PV system was controlled by a high-quality commercial charge regulator, the second PV system was controlled by a simple algorithm without an absorption stage, and the third PV system was controlled by the FRBS controller.
The knowledge-based controller was developed in C language and was executed in a computer. The inputs and outputs of this controller were transmitted through a serial interface from or to the microcontroller board, which had electronic interfaces to control the stand-alone PV system, working in a master–slave scheme. The primary characteristics of the microcontroller board were the following: 80C55 microcontroller, 64 kB RAM, serial interface, analog and digital inputs and outputs, and PWM outputs. In addition, additional electronic components were used: temperature sensors, electrical current shunts to measure generated and consumed currents, electronic interfaces to control the current in the loads, FETs, etc.
The generated current, consumed current, battery voltage, and battery temperature were directly measured from the system. While Vbat and Temp were directly obtained by physical sensors, generated and consumed currents were indirectly measured by voltage in shunts. The generated current was controlled by a PWM signal applied to an FET, and the consumed current was controlled by a digital output signal applied to another FET.
The evolutions of the most interesting variables of all PV systems were collected by data acquisition equipment (Agilent 34972A Data Acquisition Switch Unit data logger), which allowed accurate data to be obtained for analysis. Thus, other components were also necessary: calibrated PV cells, temperature sensors, electrical current sensors, etc.

4.1.2. Description of the Experiments

Experiments contained the following steps:
(1)
Initial test of battery capacity; and
(2)
For each one of three periods,
(2.1)
Complete charge of batteries;
(2.2)
Period of daily charge and discharge cycles (approximately 30 days);
(2.3)
Test of battery capacity.
To measure the evolution of the capacity of batteries, a capacity test was performed before each experiment began and after each period of daily charge and discharge cycles.
The capacity test of a battery was performed in two steps: charging the battery to a full state of charge and discharging the battery until the voltage reached a minimum value. In these tests, the full charge of the battery was accomplished in three stages: a bulk stage to quickly obtain a high state of charge, a small equalization charge, and a flotation stage. The full state of charge was obtained at the end of the charge when a constant current of charge was required to maintain the constant flotation voltage. The second step allowed obtaining the capacity of the battery using the discharge until the low-voltage disconnect voltage. The discharge step was performed at a discharge rate of approximately I10 until a voltage of 11.2 was obtained.
Each period of the experiment was composed of a complete charge of the battery; a period of daily charge and discharge cycles; and a final test of the capacity of the batteries. Complete charging was accomplished as described in the capacity test. During the period of daily charge and discharge cycles, the higher depth of discharge of the batteries was 16.2%, which corresponds with batteries of 72 Ah and a load of 12 V 35 W, during a nightly discharge time of 4 h. Charging was performed using the PV generator and depended on solar irradiance, temperature, etc.
During each experiment, the most interesting variables were collected using the data acquisition equipment. Variables that were collected for each stand-alone PV system included solar irradiance, outdoor temperature, battery voltage, battery temperature, generated current, and consumed current. The variables were sampled every minute to describe their evolutions, which allowed us to compare the results and behaviors of the controllers.
This set of obtained variables allowed the calculation of other variables, such as energetic performance, battery capacity, and battery internal resistance. The energetic performance was obtained for each period using the relationship between the total generated current and the total consumed current. The batteries’ internal resistance was calculated using the relationship between the increments of voltage and current at the disconnecting load time.

4.1.3. Comparative Results

The complete experiment, whose duration was approximately three months, was performed twice using automotive batteries from different manufacturers. In the first experiment, three batteries of 12 V 70 Ah (Group A) were used during three periods with a total duration of 77 days. In the second experiment, the batteries were 12 V 72 Ah (Group B) and used during three periods and a total duration of 93 days.
To present an example of the periods of daily charge and discharge cycles, Figure 8 shows data obtained from the second period of the experiment with Group A batteries. Figure 8A shows the evolution of irradiance on a sunny day; Figure 8B shows the typical evolution of generation and consumption current during a charge and discharge cycle; Figure 8C shows the evolution of battery voltage during the same cycle; and finally, Figure 8D shows the daily solar irradiance (Wh/m2) during this period with a mix of cloudy and sunny days, producing solar irradiance between 0.8 and 4.4 kW/m2.
Figure 8C shows the evolution of battery voltage with different steps during a complete day. The first hours correspond to the nightly period of consumption in which the battery voltage decreased linearly, and the following hours correspond to the daily generation period in which the charge of the battery was performed using bulk, absorption, and flotation phases. At the end of the charging process, the battery remained in the flotation step, while the PV source generated current.
Typical controller behaviors (basic, commercial, and proposed FRBS) are shown in Figure 8C. The primary differences between them consisted of the absorption and float stages. While the basic controller did not perform the absorption step, the commercial controller may have included an absorption step depending on the depth of the previous discharge. Conversely, the proposed controller changed the duration and voltage of the absorption step and the voltage of the float step based on available information. The typical absorption step performed by the proposed controller was performed at a lower voltage and in less time than the commercial controller absorption step. With regard to the float step, each controller used a different flotation voltage.
Table 1 and Table 2 summarize the results obtained in the experiments (battery Groups A and B, respectively). For each PV system (basic, commercial, and proposed (FRBS)), each table presents the total number of consumed Ah (Iloa*t) and generated Ah (Igen*t), the ratio of consumed to generated Ah, the values of initial and final internal battery resistance, and the results of battery capacity tests.
The first column in Table 1 and Table 2 shows the total number of Ah consumed in the experiments. In the first experiment, the daily depth of discharge was 12.5%, which corresponds to a 12 V 35 W load during 3 h/day (8.75 Ah/day) and 70 Ah batteries. Because the experiment occurred over 77 days, the total number of Ah was theoretically 673.75 Ah. In the second experiment, the daily depth of discharge was 16.2%, which corresponded to a 12 V 35 W load during 4 h/day (11.66 Ah/day) and 72 Ah batteries. Because the experiment occurred over 93 days, the total number of Ah was theoretically 1085 Ah. Despite the low daily depth of discharge, the basic controller could not complete the test in the first experiment.
The second column presents the performance calculated as the ratio of consumed to generated Ah. Although all values were similar, the higher performances corresponded to the basic controller, which seemed to be due to the absence of the absorption step. Conversely, the controllers obtained better performances than the commercial system.
The initial and final internal resistances of the batteries are shown in the other columns. Except for the basic controller in the first experiment (Table 1), all batteries slightly increased their internal resistances. The findings do not show a clear relationship between internal resistance and battery capacity. The controller that had the lowest internal resistance did not produce the largest battery capacity.
The last columns of Table 1 and Table 2 show the results of battery capacity tests for each PV system: initial capacity; capacity at the end of the first, second, and third periods; and the ratio of final to initial capacities, which were obtained at the beginning of each experiment and at the end of each period of charge and discharge cycle.

4.2. Knowledge-Based Battery Controller for IoT Devices

This section shows a description of an IoT application devoted to night lighting in which the IoT device and the LED bulbs were powered by a unique battery whose knowledge-based charge and discharge controllers were integrated into the device. Using this setup, several experiments were performed to verify that the knowledge-based controllers could be correctly executed in the constrained-resource IoT device and to analyze the behavior of the battery controller.

4.2.1. Performance of FRBS Adapted to Resource-Constrained Devices

The FRBS system designed for resource-constrained devices was developed in the C language according to the proposed modifications to the Mamdani approach defined in Section 3.4, and in Arduino language to read and write input and output variables, and communicate with RTC, LCD, etc.
To measure the performance of the designed FRBS, several tests were performed to measure the number of inferences per second that the device could perform, as well as the reaction time of each inference. Table 3 shows the device, its electrical consumption (powered at 9 V DC without any connection), and the number of inferences and the reaction time that the device could perform with a KB similar to the structured charge controller used in this work (24 rules, 3 input variables) and discharge controller (4 rules, 2 input variables).
All tested devices successfully ran the controller because the reaction time was sufficient to control the process of charging and discharging the battery. However, the Arduino Micro device was selected for additional investigation due to its lower consumption.

4.2.2. Description of the IoT Application

The IoT application was composed of IoT devices, battery and lighting controllers, a wireless network, and an IoT cloud platform whose communication was based on the Hypertext Transfer Protocol (HTTP) protocol.
The intended application of the device was to control a PV system and lighting application, and to communicate the most important variables to the platform. The device, which was based on an Arduino Micro, included the following (Figure 9):
  • One PV module (nominal power of 10 W ± 3% at standard conditions: 1000 W/m2 irradiance at a spectral distribution of air mass (AM) 1.5 and a 25 °C PV cell);
  • One 12 V 7 Ah battery;
  • One 3 W 270 lumen LED bulb;
  • One I2C RTC and I2C LCD display;
  • Sensors (electrical current, temperature) and charge and discharge actuator based on FETs.
Data were sent to the IoT platform using a wireless network and HTTP protocol using an Arduino Nano 33IoT, which could be powered on only during the transmission, considerably reducing the electrical consumption of the device.
The electrical consumption of the complete device under normal conditions (LCD display powered off and Arduino Nano 33 IoT in sleep mode) was 80 mA. Considering that the prototype was made of commercial components (microcontroller, RTC, LCD, sensors), the power consumption could be markedly reduced (no LEDs, no RTC, etc.), which was reasonable for this application.
Therefore, on sunny days, the battery powered the device and the LED bulb for 8 h with a depth of discharge of 56%. Without PV energy, the battery powered only the device for more than three days.
The IoT platform was designed and implemented by the research group members at the University of Jaén. This platform receives data from devices of different applications (using the HTTP protocol), stores data, and monitors the evolution of variables from the Internet. Figure 10 shows the evolution of the battery voltage in the platform.
Conversely, the cost of incorporating the battery controller was low compared to the cost of a commercial regulator because it was only necessary to incorporate the current and temperature sensors and the FET-based actuators.

5. Conclusions and Future Work

This study developed an effective stand-alone PV system that was designed to be incorporated into an IoT resource-constrained device. The proposed design was based on two knowledge-based controllers using structured FRBSs. In addition, an IoT lighting application was investigated, where the controllers were run on an IoT device, reducing cost.
The results showed that the proposed knowledge-based controller produced the expected behavior and achieved better performance than other controllers in both experiments, improving upon the results of a commercial controller and a basic controller.
Experimental data have shown that it is possible to execute the proposed controllers on resource-constrained devices and in an efficient way due to the measured reaction time. The designed IoT lighting application has shown that IoT technologies can be used to monitor and analyze the variables of IoT devices in near real time.
Conversely, the integration of stand-alone PV controllers into an IoT device reduces the cost of these systems because a regulator is not required.
Future research should focus on incorporating MPTT into the controllers, designing controllers for other types of batteries, and failure detection using data analysis.

Author Contributions

Conceptualization, J.C.-B. and J.-A.F.-P.; methodology, J.C.-B. and J.-A.F.-P.; software, J.C.-B.; validation, J.-A.F.-P.; formal analysis, J.C.-B. and J.-A.F.-P.; investigation, J.C.-B. and J.-A.F.-P.; resources, J.-A.F.-P.; data curation, J.C.-B. and J.-A.F.-P.; writing—original draft preparation, J.C.-B.; writing—review and editing, J.C.-B. and J.-A.F.-P.; visualization, J.C.-B. and J.-A.F.-P.; supervision, J.C.-B.; project administration, J.C.-B.; funding acquisition, J.C.-B. All authors have read and agreed to the published version of the manuscript.

Funding

This research was partially funded by University of Jaen (project POAI 2021-2022: TIC220_2021 Ingeniería de Sistemas Telemáticos).

Data Availability Statement

Restrictions apply to the availability of these data. Data are available from the authors with the permission of University of Jaen.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
AIartificial intelligence
Ageage of battery
ASTabsorption stage time
CoAPconstrained application protocol
CPUcentral processing unit
DBdata base
DCdirect current
DODdepth of discharge
FETfield effect transistor
FIgenflow of current generated
FITAfirst infer then aggregate
FLoaflow of current in the load
FLfuzzy logic
FRBSfuzzy rule based system
HTTPhypertext transfer protocol
Igencurrent generated by PV generator
Iloacurrent consumption in the load
Increincrement of regulation voltage
IoTinternet of things
KBknowledge base
LCDliquid cristal display
LoRalong range modulation
LoRaWANlong range modulation wide area networks
MPTTmaximum power point tracking
MQTTmessage queue telemetry transport
PDODprevious clicle depth of discharge
PWMpulse width modulation
PVphotovoltaic
RTCreal-time clock
RBrule base
SOCstate of charge
Tempbattery temperature
Vbatbattery voltage
Vobjvoltage objective
Vregregulation voltage
%ASpercentage of absortion stage

References

  1. Madakam, S.; Ramaswamy, R.; Tripathi, S. Internet of Things (IoT): A Literature Review. J. Comput. Commun. 2015, 3, 164–173. [Google Scholar] [CrossRef] [Green Version]
  2. Kumar, L.; Alexander, S.; Rajendran, M. Power Electronic Converters for Solar Photovoltaic Systems; Elsevier: Amsterdam, The Netherlands; Academic Press: Cambridge, MA, USA, 2021. [Google Scholar] [CrossRef]
  3. Cordón, O.; Herrera, F.; Hoffmann, F.; Magdalena, L. Genetic Fuzzy Systems: Evolutionary Tunning and Learning of Fuzzy Knowledge Bases; World Scientific: Singapore, 2001; Volume 141. [Google Scholar]
  4. Buyya, R.; Dastjerdi, A. Internet of Thing. Principles and Paradigms; Elsevier: Amsterdam, The Netherlands, 2016. [Google Scholar]
  5. Stallings, W. Foundations of Modern Networking: SDN, NFV; QoE, IoT and Cloud; Addison-Wesley Proffesional: Boston, MA, USA, 2015. [Google Scholar]
  6. Al-Fuqaha, A.; Guizan, M.; Mohammadi, M.; Aledhari, M.; Ayyash, M. Internet of Things: A survey on enabling technologies, protocols and applications. IEEE Commun. Surv. Tutor. 2015, 17, 2347–2376. [Google Scholar] [CrossRef]
  7. MQTT. Available online: http://mqtt.org/ (accessed on 24 September 2022).
  8. I.E.T.F. (IETF). The Constrained Application Protocol (CoAP). Available online: https://tools.ietf.org/html/rfc7252 (accessed on 24 September 2022).
  9. Openstack. Available online: https://www.openstack.org/ (accessed on 24 September 2022).
  10. Proxmox. Available online: https://www.proxmox.com/en/ (accessed on 24 September 2022).
  11. Hao, Z.; Novak, E.; Yi, S.; Li, Q. Challenges and Software Architecture for Fog Computing. IEEE Internet Comput. 2017, 21, 44–53. [Google Scholar] [CrossRef]
  12. Hu, P.; Dhelim, S.; Ning, H.; Qiu, T. Survey on fog computing: Architecture, key technologies, applications and open issues. J. Netw. Comput. Appl. 2017, 98, 27–42. [Google Scholar] [CrossRef]
  13. Raj, A.; Steingart, D. Power sources for the Internet of Things. J. Electrochem. Soc. 2018, 165, B3130–B3136. [Google Scholar] [CrossRef]
  14. Zhang, W.; Sheng, Q.A.; Mahmood, Z.; Tran, D.H.; Zaib, M.; Hamad, S.A.; Aljubairy, A.; Alhazmi, A.; Sagar, S.; Ma, C. The 10 Research Topics in the Internet of Things. In Proceedings of the IEEE 6th International Conference on Collaboration and Internet Computing (CIC), Atlanta, GA, USA, 1–3 December 2020. [Google Scholar] [CrossRef]
  15. Satpathy, R.; Pamuru, V. Solar PV System. Design, Manufacturing and Applications from Sand to Systems; Acadamic Press: Cambridge, MA, USA, 2021. [Google Scholar]
  16. Madeti, S.; Singh, S. Monitoring system for photovoltaic plants: A review. Renew. Sustain. Energy Rev. 2017, 67, 1180–1207. [Google Scholar] [CrossRef]
  17. Bendib, B.; Belmili, H.; Krim, F. A survey of the most used MPPT methods: Conventional and advanced algorithms applied for photovoltaic systems. Renew. Sustain. Energy Rev. 2015, 45, 637–648. [Google Scholar] [CrossRef]
  18. Rezk, H.; Eltamaly, A. A comprehensive comparison of different MPPT techniques for photovoltaic systems. Sol. Energy 2015, 112, 1–11. [Google Scholar] [CrossRef]
  19. Zadeh, A. Fuzzy Sets. Inf. Control 1965, 8, 338–353. [Google Scholar] [CrossRef] [Green Version]
  20. Mamdani, E. Application of fuzzy algorithms for control of simple dynamic plant. Proc. Inst. Electr. Eng. 1974, 121, 1585–1588. [Google Scholar] [CrossRef]
  21. Mamdani, E.; Assilian, S. An experiment in linguistic synthesis with a fuzzy logic controller. Int. J. Man Mach. Stud. 1975, 7, 1–13. [Google Scholar] [CrossRef]
  22. Takagi, T.; Sugeno, M. Fuzzy Identification of Systems and Its Applications to Modeling and Control. IEEE Trans. Syst. Man Cybern. 1985, SMC-15, 116–132. [Google Scholar] [CrossRef]
  23. Lopez-Vargas, A.; Fuentes, M.; Vivar, M. IoT Application for Real-Time Monitoring of Solar Home Systems Based on Arduino™ With 3G Connectivity. IEEE Sens. J. 2019, 19, 679–691. [Google Scholar] [CrossRef]
  24. Kumar, N.; Atluri, K.; Palaparthi, S. Internet of Things (IoT) in PV Systems. In Proceedings of the 2018 National Power Engineering Conference (NPEC), Madurai, India, 9–10 March 2018. [Google Scholar] [CrossRef]
  25. Lopez-Vargas, A.; Fuentes, M.; Vivar, M. On the application of IoT for real-time monitoring of small stand-alone PV systems: Results from a new smart datalogger. In Proceedings of the 2018 IEEE 7th World Conference on Photovoltaic Energy Conversion (WCPEC), Waikoloa, HI, USA, 29 November 2018. [Google Scholar] [CrossRef]
  26. Hamied, A.; Melli, A.; Zoulid, M.; Birouk, R. IoT-based experimental prototype for monitoring of photovoltaic arrays. In Proceedings of the 2018 International Conference on Applied Smart Systems (ICASS), Medea, Algeria, 24–25 November 2018. [Google Scholar] [CrossRef]
  27. González, I.; Portalo, J.; Calderón, A. Configurable IoT Open-Source Hardware and Software I-V Curve Tracer for Photovoltaic Generators. Sensors 2021, 21, 7650. [Google Scholar] [CrossRef] [PubMed]
  28. Vermesan, O. Internet of Things. Strategic Research Roadmap, European Commission. 2009. Available online: http://www.internet-of-things-research.eu/pdf/IoT_Cluster_Strategic_Research_Agenda_2009.pdf (accessed on 24 September 2022).
  29. Vermesan, V.; Friess, P. Internet of Things: Converging Technologies for Smart Environments and Integrated Ecosystems; River Publishers: Gistrup, Denmark, 2013. [Google Scholar]
  30. Bago, J.; Galan, S.G.; Aguilera, J.; Perez, J.R.V.; Layos, L.M. Fuzzy controller applications in stand-alone PV system. Mathware 2002, IX, 85–115. [Google Scholar]
  31. Pachauri, R.K.; Pandey, J.K.; Sharma, A.; Nautiyal, O.P.; Ram, M. Applied Soft Computing and Embedded System Applications in Solar Energy; Taylolr & Francis: London, UK; CRC Press: Boca Raton, FL, USA, 2021. [Google Scholar]
  32. Shaw, R.; Mendis, M.; Mekhilef, S.; Ghosh, A. AI and IOT in Renewable Energy; Springer: Berlin/Heidelberg, Germany, 2021. [Google Scholar]
  33. Shiau, J.; Wei, Y.; Chen, B. A Study on the Fuzzy-Logic-Based Solar Power MPPT Algorithms Using Different Fuzzy Input Variables. Algoritms 2015, 8, 100–127. [Google Scholar] [CrossRef]
  34. Fannakh, M.; Elhafyani, M.; Zougar, S. Hardware implementation of the fuzzy logic MPPT in an Arduino card using a Simulink support package for PV application. IET Renew. Power Gener. 2019, 13, 510–518. [Google Scholar] [CrossRef]
  35. Shaw, R.; Ghosh, A.; Mekhilef, S.; Balas, V. Applications of AI and IOT in Renewable Energy; Elsevier: Amsterdam, The Netherlands, 2022. [Google Scholar]
  36. Canada-Bago, J.; Fernandez-Prieto, J.A.; Perez-Higueras, P.; Gadeo-Martos, M. Knowledge-Based Sensors for Controlling A High-Concentration Photovoltaic Tracker. Sensors 2020, 20, 1315. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  37. Mellit, A.; Kalogirou, S. Artificial intelligence and internet of things to improve efficacy of diagnosis and remote sensing of solar photovoltaic systems: Challenges, recommendations and future directions. Renew. Sustain. Ennergy Rev. 2021, 143, 110889. [Google Scholar] [CrossRef]
Figure 1. Structure of a typical stand-alone PV system.
Figure 1. Structure of a typical stand-alone PV system.
Jsan 11 00076 g001
Figure 2. I–V curve for different solar irradiances.
Figure 2. I–V curve for different solar irradiances.
Jsan 11 00076 g002
Figure 3. Evolution of the battery voltage in a three-stage charging process.
Figure 3. Evolution of the battery voltage in a three-stage charging process.
Jsan 11 00076 g003
Figure 4. Interconnection of the controller and stand-alone PV system.
Figure 4. Interconnection of the controller and stand-alone PV system.
Jsan 11 00076 g004
Figure 5. Structure of the stand-alone PV FRBS charging controller.
Figure 5. Structure of the stand-alone PV FRBS charging controller.
Jsan 11 00076 g005
Figure 6. Membership functions defined in each variable.
Figure 6. Membership functions defined in each variable.
Jsan 11 00076 g006
Figure 7. Discharge controller. Membership functions defined in each variable.
Figure 7. Discharge controller. Membership functions defined in each variable.
Jsan 11 00076 g007
Figure 8. Example of data obtained in the first experiment with Group A batteries.
Figure 8. Example of data obtained in the first experiment with Group A batteries.
Jsan 11 00076 g008
Figure 9. IoT device with integrated battery controller.
Figure 9. IoT device with integrated battery controller.
Jsan 11 00076 g009
Figure 10. Evolution of battery voltage monitored in the platform.
Figure 10. Evolution of battery voltage monitored in the platform.
Jsan 11 00076 g010
Table 1. Results of the first experiment with type A batteries.
Table 1. Results of the first experiment with type A batteries.
Σ(Iloa·t)
(Ah)
Σ(Igen·t)
(Ah)
η
(%)
R (Ω)Capacity of Battery
InitialFinalInitial
(Ah)
1st Period
(Ah)
2nd Period
(Ah)
Final
(Ah)
Final/Initial
(%)
Basic566.49585.230.9670.1590.23940.6614.265.502.185.36
Commercial648.48680.410.9530.1160.11956.4826.8216.0310.4018.41
FRBS659.24678.420.9710.1530.15845.4727.0415.8710.2122.45
Table 2. Results of the second experiment with type B batteries.
Table 2. Results of the second experiment with type B batteries.
Σ(Iloa·t)
(Ah)
Σ(Igen·t)
(Ah)
η
(%)
R (Ω)Capacity of Battery
InitialFinalInitial
(Ah)
1st Period
(Ah)
2nd Period
(Ah)
Final
(Ah)
Final/Initial
(%)
Basic1021.261040.380.9820.1140.11963.8048.5047.2042.9067.24
Commercial1053.531099.210.9580.1000.11068.7055.6052.8047.9069.72
FRBS1042.251069.730.9740.1360.14264.2049.0046.5046.0071.75
Table 3. Performance of designed FRBS in different devices.
Table 3. Performance of designed FRBS in different devices.
DeviceConsumption
(9vDC)
Knowledge
Base
Inferences/sgReaction Time
Arduino MEGA 256078 mA24 rules
3 input variables
7114 ms
4 rules
2 input variables
5501.8 ms
Arduino Micro30mA24 rules
3 input variables
7413.5 ms
4 rules
2 input variables
5501.8 ms
Arduino DUE70 mA24 rules
3 input variables
5002 ms
4 rules
2 input variables
20000.5 ms
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Canada-Bago, J.; Fernandez-Prieto, J.-A. A Knowledge-Based Battery Controller for IoT Devices. J. Sens. Actuator Netw. 2022, 11, 76. https://doi.org/10.3390/jsan11040076

AMA Style

Canada-Bago J, Fernandez-Prieto J-A. A Knowledge-Based Battery Controller for IoT Devices. Journal of Sensor and Actuator Networks. 2022; 11(4):76. https://doi.org/10.3390/jsan11040076

Chicago/Turabian Style

Canada-Bago, Joaquin, and Jose-Angel Fernandez-Prieto. 2022. "A Knowledge-Based Battery Controller for IoT Devices" Journal of Sensor and Actuator Networks 11, no. 4: 76. https://doi.org/10.3390/jsan11040076

APA Style

Canada-Bago, J., & Fernandez-Prieto, J. -A. (2022). A Knowledge-Based Battery Controller for IoT Devices. Journal of Sensor and Actuator Networks, 11(4), 76. https://doi.org/10.3390/jsan11040076

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