Fish Tank Automation PDF
Fish Tank Automation PDF
fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2019.2905017, IEEE Access
Date of publication xxxx 00, 0000, date of current version xxxx 00, 0000.
Digital Object Identifier 10.1109/ACCESS.2017.Doi Number
ABSTRACT Many people feed the pet fish in the aquarium tanks that need to be properly set up and
maintained, or the fish will be destined to unpleasant and short life. Therefore it is critical to monitor water
conditions closely and improve the water quality for the mini aquarium tanks. Based on an IoT solution called
IoTtalk, this paper proposes the FishTalk system that utilizes the aquarium sensors to drive the actuators in
real time. We describe the relationship between aquarium sensors and the actuators, and give concrete
examples about threshold setting. Our solution allows the designer to quickly deploy intelligent control for
various water conditions. As an example we implement an intelligent fish feeding mechanism such that the
fish are neither over nor under fed, and at the same time, the fish owner can enjoy watching fish feeding
remotely. We have also developed analytic model, simulation and measurement experiments to investigate
the effects of IoT message delays and loss on water condition control.
INDEX TERMS Aquarium, Internet of Things (IoT), message lost, NB-IoT, performance evaluation
2169-3536 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2019.2905017, IEEE Access
Item Dolan [1] Salim [3] Salim [4] Chen [6] Encinas [7] Tseng [22] Raju [23] FishTalk
1. Sensors pH, CO2, pH, DO, pH, DO, pH, DO, pH, DO, pH, DO, DO, Salt, NH3, pH, EC, DO, TDS,
O2, NH3 Temp. Temp. Water level, Temp. Temp., Nitrite, Temp., Water level, Temp.
Temp. Water Level pH, Alkalinity
2. Actuators Heater No Air Pump Heater, Light No No Light Feeder, Fan,
Feeder, Heater, Light, Air
Air Pump, Pump, RO Filter
3. Actuators No No No Yes No No No (Light is Yes
Controlled (Manual) (Manual) (Simple always on at
by Sensors threshold) night)
4. Smart No No No No (manual) No No No Yes
Feeder
5. Video No No No No No No No Yes
Monitoring
6. Control No N/A Raspberry MSP430 Arduino Uno Arduino Uno Raspberry Pi 3 Arduino UNO,
Board Pi 3 ESP8266 ESP-
12F, ROHM IoT
kit , MediaTek
LinkIt Smart 7688
Duo
the water factors interact with each other. In this way, the reader who knows aquarium well, Sections II-IV can be
sensors do not just provide raw data (as the previous solutions skipped.
do) but also allow the fish owners to know more about their
aquarium environments. We have developed this type of II. DISSOLVED GAS FACTORS FOR WATER QUALITY
FishTalk applications to be used by National Taiwan Science Dissolved gases such as carbon dioxide, oxygen and
Education Center to teach students in junior high schools for ammonia greatly influence the water quality in an aquarium
aquarium science experiments. tank. These gases are described in this section.
Overfeeding is the number one mistake made by fish
owners, as uneaten food will pollute the water. In item 4, A. CARBON DIOXIDE
none of previous solutions provide fish feeding mechanism Dissolved carbon dioxide causes suffocation and lowers the
except for [6] that uses a mechanical timer to automatically pH of water, which leads to stressful hypercapnia conditions
trigger the feeding mechanism. Such mechanism is not for fish and will eventually result in death. When the water
reliable and may drop too much food to kill the fish. With tank has high levels of free carbon dioxide, fish have to
FishTalk, one can easily implement smart feeding that allows adjust their blood bicarbonate levels to avoid acidosis, which
fish owner to remotely enjoy manual feeding while the can happen when the transfer of carbon dioxide from the
fish are neither underfed nor overfed (to be described in fish’s blood to the surrounding water is greatly reduced.
Section V). When the carbon dioxide level in water is high, fish exposed
In item 5, FishTalk provides video monitoring that are not to hypercapnia can recover by significantly increasing their
blood plasma and taking up bicarbonate in exchange for
found in other smart aquarium solutions. The cost of off-the-
chloride. However, when high carbon dioxide levels are
shelf camera can be shared by other smart applications in a
coupled with low oxygen levels, the result is a decrease in
room. In [24] we have designed a smart saloon in a student
oxygen affinity and sometimes carrying capacity of the
dormitory where one camera is used to remotely monitor and
blood, which is often fatal. Although the toxicity threshold
enjoy the views of various IoT applications (such as smart dart, for free carbon dioxide concentration can vary considerably,
curtain control, smart plant and FishTalk). depending on dissolved oxygen levels, a free carbon dioxide
To simplify and strengthen our discussion, we focus on concentration of 30 parts per million (ppm) or milligrams per
freshwater tank without plants. The paper is organized as liter (mg/L) is typically safe for most fish [9].
follows. Section II introduces the dissolved gases that affect
the water quality of the aquarium tank. Sections III and IV B. OXYGEN
describe the sensors and the actuators used in FishTalk, An aquarium needs oxygen to support the livestock.
respectively. Section V proposes FishTalk as an IoT-based Decreased oxygen concentration combined with elevated
aquarium system. Based on NB-IoT and Wi-Fi, Section VI carbon dioxide concentration in the water leads to
conducts performance evaluation on the IoT message delays suffocation [10]. The oxygen requirements differ depending
and their impact on the aquarium operations. Section VII on the type and the weight of fish. For some species without
concludes our work by listing three major contributions not additional organs, the result of low dissolved oxygen is
found in the previous studies. This paper is written for the immediate death. Some species have developed labyrinth
IoT experts who do not have aquarium knowledge. For the organs to allow air breathing in hypoxic conditions. However,
oxygen deprivation (hypoxia) still occurs when the oxygen
2
2169-3536 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2019.2905017, IEEE Access
tension is lower than the organism’s requirement. Depending shown in the figure. Figure 1 (b) illustrates the temperature
on the fish species, the oxygen levels should be higher than sensor used in FishTalk.
a certain concentration (usually 2-4 mg/L) to avoid oxygen
depletion.
C. AMMONIA
Free Ammonia is extremely toxic to fish [1]. High ammonia
concentration can cause a decrease in blood serum ATP and
lead to tissue necrosis. This further increases the energy
demands on the gill organism. Initially, the fish might appear
to gasp at the surface for air while their gills take on a red or
lilac color. Then the fish might lie at the bottom of the tank
with clamped fins as their body functions fail. The fish
become increasingly lethargic and start losing their appetites.
The brain, organs, and the central nervous system become
damaged. Finally, the fish begin to hemorrhage,
and eventually die.
Chemically treated tap water and the decomposition of
organic matter inside the tank (e.g., aquarium plants, fish
excrement, and uneaten fish food) contribute to ammonia
poisoning (free ammonia; to be elaborated in Section III-B)
that often occurs during the setup of a new tank. It can also
occur when too many fish are added at one time, or when
filters are not kept clean. Ammonia poisoning also occurs if
the water is not changed regularly or if bacterial colonies die FIGURE 1. The FishTalk sensors (DO: dissolved oxygen; EC: electrical
off due to a sudden change in water conditions or the use of conductivity; TDS: total dissolved solids).
medications.
2169-3536 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2019.2905017, IEEE Access
two forms: free ammonia (NH3) and ammonium, where free The FishTalk sensors measure the aquarium environment
ammonia is the toxic part. Figure 3 illustrates that for a fixed and indicate how and when to maintain the tank. If we fail to
amount of ammonia (e.g., 2.0 ppm), the portion of free maintain the aquarium tank, the fish will be stressed by
ammonia in the tank water is affected by temperature and pH.
deficient water conditions, will be more susceptible to
Specifically, free ammonia increases as temperature and pH
increase [14]. When the free ammonia level is higher than disease, and often will have a shorter lifespan. In FishTalk,
0.02 ppm, the fish owner should be cautious, and the water maintenance, with the exception of changing water, is
must be changed when the level is higher than 0.05 ppm. automatically performed by the aquarium actuators. In the
current version of FishTalk, water is changed manually or
semi-automatically with the assistance of the water pumps.
A water level sensor (Figure 1 (e)) is used to detect the water
level of the aquarium tank. When the water level is too low
(e.g., caused by evaporation of fan blowing described in
Section IV-B), FishTalk can remind the fish owner when to
change/add water through an alert mechanism. The
frequency varies depending on many factors. For a large,
sparsely stocked aquarium, 10 to 15 percent of the water
should be changed every two weeks. For a small, heavily
stocked tank, up to 20 percent of the water should be changed
each week. For a lazy fish owner, as long as he/she is
FIGURE 3. Effects of temperature and pH on free ammonia.
regularly performing partial water changes every couple of
weeks, the exact frequency is not so critical. The actuators
C. THE ELECTRICAL CONDUCTIVITY SENSOR AND automatically activated by FishTalk are described in the
CARBONATE HARDNESS remainder of this section.
Another important aspect of water chemistry is carbonate
hardness (KH) that represents the pH buffering capacity of
the water. Harder water will have a higher buffering capacity.
The ideal KH medium range is 4° – 6 °KH. However, the KH
ranges are much higher for specific species, such as
poeciliidae (8° – 10 °KH), African cichlid (± 20 °KH), and
salt water fishes (10 ° – 15 °KH). In [9], water with a KH of (b) Heater
4° (4KH) is suggested to monitor the CO2 level with more
(a) Food feeder
accuracy.
EC is roughly related to general hardness (GH) and TDS
[15], and a correct EC level is needed to keep the fish healthy.
For example, comfortable EC value ranges from 100 to 300
µS/cm for community freshwater tanks. For the Discus and
Paracheirodon species, the required EC values are below (d) Pump
100µS/cm, while cichlids from African lakes (i.e., Malawi
and Tanganyika) grow well at values above 500 µS/cm. (c) Fan
Pollutants affect the EC value by increasing it. Therefore,
a change in the EC value indicates a change in water
conditions. The appropriate EC value can be easily
maintained by changing the water to reduce the pollutants. If
the EC value is too high, an appropriate amount of osmotic (e) Light (f) RO filter
water (see Section IV-D) can be used to dilute the tank
water. On the other hand, if the EC value is too low for the FIGURE 4. The FishTalk actuators (RO: Reverse Osmosis).
2169-3536 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2019.2905017, IEEE Access
(e.g., during the setup of a new tank), it is advised to feed Therefore, the deposits can be washed from the membrane to
fish no more than once per day to reduce the waste improve the RO efficiency [16].
productions. In FishTalk, a food feeder (Figure 4 (a)) is Although the RO filter is efficient at removing unwanted
smartly and automatically controlled. The details will be ions from water, the RO membranes may become blocked
given in the next section. over time. Such a problem cannot be confirmed by visual
inspection, but can be detected by the TDS sensor (Figure 1
B. AQUARIUM HEATER AND FAN (f)) if its value is high. The TDS sensor detects anions and
A heater (Figure 4 (b)) is used to increase the water cations (such as magnesium, calcium, silicate, sodium,
temperature in an aquarium tank. Unfortunately, mini tanks phosphate and nitrate) in the water of the aquarium tank.
are difficult to heat properly, and heaters specifically When the TDS value is higher than e.g., 10 ppm, it is an early
designed for mini aquariums should be selected. To disperse warning for the deterioration of tank water. Note that the
heated water more quietly and evenly throughout the tank, TDS sensor does not work for reef aquaria with salt water.
the heater should be placed near the filter intake so that the The waste water produced from the RO outlet has elevated
warm water from the heater will be sucked through the levels of nitrates, phosphates, heavy metals, and pesticides
filter’s intake along with a cooler stream from the bottom of that should not exist in the aquarium tank. This waste water
the aquarium. is reused for garden plants in the student dorms at NCTU.
To reduce the water temperature, a fan (Figure 4 (c)) can
be used to blow across the surface of the tank water to V. CREATION OF FISHTALK PROJECTS
increase evaporation. Water releases much more energy FishTalk is an IoT-based aquarium system developed
when it transitions from water to vapor, which drops the according to an IoT device management platform called
temperature. Therefore, a fan blowing across the surface of IoTtalk [8][17][18]. Figure 5 illustrates a simplified block
the tank water reduces water temperature by increasing diagram for FishTalk, which consists of the FishTalk sensors
evaporation. (Figure 5 (1)), actuators (Figure 5 (2)) and the FishTalk
server (Figure 5 (3)).
C. WATER PUMP AND LIGHT
The water pump (Figure 4 (d)) generates currents and
aeration, and move water through aquarium tank peripherals
such as the filters. Water movement creates aeration by
constantly mixing the surface with the rest of the water. The
currents prevent detritus from accumulating. It is suggested
to select the pump capable of moving five times as many
gallons per hour as the tank holds.
If live plants, photosynthetic invertebrates, or macroalgae
are not kept in an aquarium tank, the only lighting needed on
the tank is for viewing fish. Light does not penetrate water
easily, and every inch of depth greatly decreases the effective
FIGURE 5. A simplified block diagram for FishTalk.
illumination. The use of good reflectors can increase
effective illumination by directing more of the light In FishTalk, the IoT devices can connect to the FishTalk
produced into the tank. Very high output (VHO) or power server through various communications technologies such as
compact (PC) lamps can be used for a 12-inch-deep tank NB-IoT, LoRa, Sigfox, Wi-Fi, LTE and Ethernet. For the
(Figure 4 (e)). For a depth of 18 or 24 inches, metal halides example in Figure 5, the sensors are connected to a NB-IoT-
are more appropriate. based control board (Figure 5 (4)) [19]. This control board
interacts with the FishTalk server through NB-IoT wireless
D. REVERSE OSMOSIS FILTER
communications (Figure 5 (5)). Similarly, the actuators are
The Reverse Osmosis (RO; see Figure 4 (f)) lowers pH in the
instructed by the FishTalk server through another NB-IoT
aquarium tank and purifies the tap water. An efficient RO
unit can remove 90% or more of tap water contaminants, the based control board (Figure 5 (6)). Besides the sensors, any
semi-permeable membrane acts as an ultra-fine filter to standard smartphone (Figure 5 (7)) can connect to the
allow only water molecules to pass through, and strain most FishTalk server through its browser based on the LTE or the
unwanted constituents. This part is expensive and easily 5G technologies for video monitoring (Figure 5 (8)). Note
damaged, and some high-output units may have multiple that the NB-IoT based control boards are typically used in
membranes. The pre-filters are placed before the membrane outdoor environments. In an indoor environment, Wi-Fi
to remove sediment, chlorine and other components of mains based control boards are used [20].
water which would rapidly block and/or destroy the The FishTalk web page of the smartphone includes four
membrane. A flow restrictor is a valve that allows pressure areas. The control sliding bar area (Figure 6 (1)) provides
to build up in the system for reverse osmosis to take place. A soft switches to control the heater, the fans and other
flush valve may be incorporated to bypass the flow restrictor. actuators connected to FishTalk. The display bar area (Figure
2169-3536 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2019.2905017, IEEE Access
6 (2)) shows the real-time values of the sensors connected to The actuators icon (Figure 8 (4)) includes food feeder, pump,
FishTalk. The video control bar area (Figure 6 (3)) provides heater, fan, light, UV and RO. The controls icon (Figure 8
buttons to zoom in, zoom out and rotate a camera for viewing (5)) includes the “on/off” switches for the actuators. It is very
the aquarium tank (Figure 6 (4)). easy to connect a soft control switch to the corresponding
actuator: simply drag a line between the switch icon to the
actuator icon. For example, the link “Join 5” allows the
“FoodFeeder-I” switch to control the food feeder. When the
link is created, the FishTalk engine automatically generates
a program to handle the interaction between the control and
the actuator. Similarly, an actuator can be controlled by
multiple sensors through the Join links. In our configuration,
the heater is controlled by the temperature sensor through
Join 1. The fans are controlled by both the temperature and
the pH sensors through Join 2. The pump is controlled by the
temperature and the DO sensors through Join 3. The RO
filter is controlled by the EC and the TDS sensor through
FIGURE 6. The smartphone browser for FishTalk. Join 4.
When an icon in the display bar area is clicked, the
smartphone shows the time series chart of the sensor as
illustrated in Figure 7. In this figure, we turn on the fans at
point (1). Then we turn on the heater at point (2) and then
turn it off shortly. The time series charts indicate that from
point (1) to point (2), the temperature decreases, and the EC
value increases. At point (2), the temperature increases
sharply and then decreases again. The example in Figure 7
shows that the FishTalk web-based display provides chart
information that allows the fish owner to understand the
aquarium water conditions easily.
2169-3536 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2019.2905017, IEEE Access
on).When the temperature is in the range [23°C, 27°C], no FeedButton device, when one presses the button, FeedTime-
action is taken (i.e., the server does not send any output to I sends out the time when the button is pressed. Furthermore,
Heater-O). if the water quality is poor (TDS is higher than 600 ppm) the
feeding mechanism is disabled. Without loss of generality,
the FishFeeder project uses the TDS sensor (TDS-I; see
Figure 10 (6)) to monitor the water quality. Other sensors can
be included in the Sensors device for water quality
monitoring. TDS-I is also connected to a cyber device
Messaging (Figure 10 (7)) through Join 2. When the water
quality is poor, the fish owner will receive a warning
message from WQ-Alert-O.
2169-3536 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2019.2905017, IEEE Access
𝑛 𝑛
Note that if both the Aquarium and the FoodFeeder where E[𝑡] = and V[𝑡] = .
λ λ2
projects are enabled, then the food feeder can be controlled
by both projects. However, it is highly recommended that
Join 5 in the Aquarium project is disabled when the
Fishfeeder Project is executed.
All fish sensor and actuator device models (Figure 8 (3)-
(5) and Figure 10 (2)-(6)) and the Join functions were
developed in FishTalk. The video monitoring/control and
dashboard (Figure 6) were developed in FishTalk and then
became a general monitor & control cyber IoT device
accommodated in IoTtalk for other IoTtalk applications. The
Messaging device model (Figure 10 (7)) is reused from
IoTtalk.
2169-3536 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2019.2905017, IEEE Access
VII. CONCLUSIONS
Based on an IoT solution called IoTtalk, this paper proposed
the FishTalk system that allows the aquarium sensors to
drive the actuators in real time. We have made the following
FIGURE 14. Effects of E[𝒕𝒅 ] and V[𝒕𝒅 ] on 𝐏𝐫[𝒕∗𝑻 > 𝒕𝒅 ].
2169-3536 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2019.2905017, IEEE Access
contributions not found in the previous approaches [2] S. Sharpe, “Aquarium Nitrogen Cycle: How an Aquarium Cycles,” The
[3],[4],[5],[6],[7],[22] ,[23]: Spruce Pets. 2018. [Online]. Available:
We clearly described the relationship between aquarium https://www.thesprucepets.com/aquarium-nitrogen-cycle-1378370
sensors and the actuators, and gave concrete examples [3] C. Salim, P. Cousin and S. Dupont, “IoT for Aquaculture 4.0 Smart and
about threshold setting that can be easily translated for easy-to-deploy real-time water monitoring with IoT,” 2018 Global
programming in an IoT system. Internet of Things Summit (GIoTS), 2018.
We showed how to intelligently feed the fish through a [4] T. Salim, T. Haiyunnisa and H. Alam, “Design and Implementation of
combined automate and manual control mechanism such Water Quality Monitoring for Eel Fish Aquaculture An Examination of
that the fish are neither over nor under fed, and at the same Microbubble Aeration,” 2016 International Symposium on Electronics
time, the fish owner can enjoy watching fish feeding
and Smart Devices (ISESD) November 29-30, 2016.
remotely. Our solution allows the designer to quickly
[5] K. M. Stehfest, et. al., “Response of Atlantic salmon Salmo salar to
deploy intelligent control for various water conditions.
temperature and dissolved oxygen extremes established using animal-
We have developed analytic model, simulation and
borne environmental sensors,” Nature, 2017.
measurement experiments to investigate the effects of IoT
[6] J.-H. Chen, W.-T. Sung and G.-Y. Lin, “Automated Monitoring System
message delays and loss on the water condition control.
Such study has not been conducted by existing smart for the Fish Farm,” 2015 IEEE International Conference on Systems, Man,
aquarium solutions. and Cybernetics, 2015.
Although FishTalk aims for mini aquarium systems, the [7] C. Encinas, et. al., “Design and implementation of a distributed IoT system
software can be directly reused in a large-scale fish farm after for the monitoring of water quality in aquaculture,” 2017 Wireless
appropriate replacement of the actuators and parameter Telecommunications Symposium (WTS), 2017.
setting. [8] Y.-B. Lin, et. al., “IoTtalk: A Management Platform for Reconfigurable
As a final remark, we briefly discuss the cost incurred to Sensor Devices,” IEEE Internet of Things Journal, 2017, 4, (5), pp. 1152–
develop a FishTalk aquarium. The costs are calculated as 1562.
follows. [9] George Farmer, “CO2: Striking the balance,” Practical Fishkeeping
(1) Sensors (Figure 5 (1)) and actuators (Figure 5 (2)): Magazine, 2016. [Online]. Available:
FishTalk accommodates off-the-shelf sensors and https://www.practicalfishkeeping.co.uk/features/articles/co2-striking-
actuators. Therefore, the customers can choose the the-balance
sensors/actuators with the prices that fit their budget [10] F.-F. Ruth, “Dissolved Oxygen for Fish Production,” Texas A&M
constraints. The sensor/actuator costs are the same as AgriLife, 2003. [Online]. Available: https://agrilifecdn.tamu.edu/fisheries
the previous solutions except that in FishTalk, some of /files/2013/ 09/Dissolved-Oxygen-for-Fish-Production1.pdf
the devices can be shared with other IoT applications [11] J. E. Bly and W. L. Clem, “Temperature and teleost immune functions,”
that reuse the tank water (e.g., the smart plant Fish & Shellfish Immunology, 2 (1992), pp. 159-171.
applications). By doing so, the equipment costs for [12] T. Masaharu, et. al., “Sawada Y(2014) Effect of Temperature on Survival,
FishTalk and the smart plant application are actually
Growth and Malformation of Cultured Larvae and Juveniles of the Seven-
reduced in the saloon of the NCTU student dormitory.
band Grouper Epinephelus Septemfasciatus,” Fisheries Science, 80(1):
(2) The control board (Figure 5 (4) and (6)): if we use 69-81.
ESP8266, the cost is about 4 USD. For other solutions in [13] Algone, “The Importance of Oxygen in the Aquarium,” General
Table 1, the costs are higher. Aquarium & Fish Information, 2018. [Online]. Available:
https://www.algone.com/oxygen-in-the-aquarium
(3) The FishTalk server (Figure 5 (3)): it will become open [14] Jetajockey, “Your Guide to Ammonia Toxicity,” Aquarium Advice. 2011.
source software for free. [Online]. Available: http://www.aquariumadvice.com/forums/f12/your-
guide-to-ammonia-toxicity-159994.html
(4) Monitoring and Control (Figure 5 (7)): we use a [15] T. Sarac, “Electrical Conductivity in Freshwater Aquariums,” Fluval.
smartphone with the web-based application for 2018. [Online]. Available: http://fluvalaquatics.com/ca/explore/did-you-
monitoring and control. We assume that everyone has a know/equipment/155-electrical-conductivity-monitoring-system-part-
smartphone and there is no need to purchase one two/#.XAL_hzgzZ0x
specifically for FishTalk. The web-based software is free. [16] “What You Need to Know About Reverse Osmosis,” Practical
If a camera is included (the fish owner may also use it for
Fishkeeping, 2016. [Online]. Available:
home security or other smart applications), we can
https://www.practicalfishkeeping.co.uk/features/ articles/what-you-need-
purchase any off-the-shelf camera within the allowable
to-know-about-reverse-osmosis
budget, and the cost is shared by all IoT applications in
[17] Y.-B. Lin, et. al., “EasyConnect: A Management System for IoT Devices
the room.
and Its Applications for Interactive Design and Art,” IEEE Internet of
REFERENCES Things J., 2015, 2, (6), pp 551–561.
[1] A. Dolan, “The Effects of Aquarium Size and Temperature on Color [18] Y.-W. Lin, et. al., “IoTtalk-RC: Sensors as Universal Remote Control for
Vibrancy, Size, and Physical Activity in Betta Splendens,” Technical Aftermarket Home Appliances,” IEEE Internet of Things Journal, 2017,
Report, Maryville College, 2015. 4, (4), pp. 1104–1112.
10
2169-3536 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2019.2905017, IEEE Access
∞ 𝑡𝑇
[19] Y.-B. Lin, et. al., “NB-IoTtalk: A Service Platform for Fast Development
of NB-IoT Applications,” Accepted and to appear in IEEE Internet of
𝐵=∫ ∫ 𝑓𝑇 (𝑡𝑇 )𝑓𝐸 (𝑡𝑎 , 𝑛𝑎 , λ𝑎 )
𝑡𝑇 =0 𝑡𝑎 =0
Things Journal. 𝑛𝑠 −1 𝑗
[20] Y.-W. Lin, et. al., “ArduTalk: AnArduino Network Application λ𝑠 𝑗 𝑗
×[∑ ( ) ∑ ( ) 𝑡𝑇 𝑗−𝑖 𝑒 −λ𝑠 𝑡𝑇 (−𝑡𝑎 )𝑖 𝑒 λ𝑠𝑡𝑎 ] 𝑑𝑡𝑎 𝑑𝑡𝑇 (6)
Development Platform based on IoTtalk,” IEEE System Journal. Page(s): 𝑗! 𝑖
𝑗=0 𝑖=0
1 – 9, 28 November 2017.
From (5) and (1), we have
[21] Y.-B. Lin, et. al., “LWA Rate Adaption by Enhanced Event-Triggered 𝑛𝑎 −1
Reporting,” IEEE Transactions on Vehicular Technology, vol. 67, no. 11,
∞ λ𝑎 𝑗 𝑡𝑇 𝑗 𝑒 −λ𝑎 𝑡𝑇
𝐴=∫ 𝑓𝑇 (𝑡𝑇 ) (1 − ∑ ) 𝑑𝑡𝑇
pp. 10950-10959, Nov. 2018.
𝑡𝑇 =0 𝑗=0
𝑗!
[22] S.-P. Tseng, Y.-R. Li, and M.-C. Wang, “An Application of Internet of
𝑛𝑎 −1
Things on Sustainable Aquaculture System, ” International Conference ∞ λ𝑎 𝑗 𝑡𝑇 𝑗 𝑒 −λ𝑎 𝑡𝑇
on Orange Technologies, 2016. =1−∫ 𝑓𝑇 (𝑡𝑇 ) ( ∑ ) 𝑑𝑡𝑇
𝑡𝑇 =0 𝑗=0
𝑗!
[23] K. R. S. R. Raju and G. H. K. Varma, “Knowledge Based Real Time
𝑛𝑎 −1
Monitoring System for Aquaculture Using IoT,” IEEE 7th International λ𝑎 𝑗 ∞
Advance Computing Conference, 2017. =1− ∑ ( )∫ 𝑡𝑇 𝑗 𝑓𝑇 (𝑡𝑇 )𝑒 −λ𝑎 𝑡𝑇 𝑑𝑡𝑇 (7)
[24] Y.-B. Lin, et. al., “CampusTalk: IoT devices and their interesting features 𝑗=0
𝑗! 𝑡𝑇 =0
on campus applications,” IEEE Access, vol. 6, pp. 26036-26046, 2018. From the frequency-domain general derivative of the
Laplace transform, for a function f(t) with the Laplace
APPENDIX A transform 𝑓. ∗ (𝑠) we have
This appendix derives the probability Pr[𝜏𝑑,3 > 𝜏𝑑,2 ] as ∞ 𝑑.(𝑗) 𝑓. ∗ (𝑠)
∫ 𝑡 𝑗 𝑓(𝑡)𝑒 −s𝑡 𝑑𝑡 = (−1) 𝑗 [ ] (8)
follows. It is clear that Pr[𝜏𝑑,3 > 𝜏𝑑,2 ] = Pr[𝑡𝑇 > 𝑡𝑠 + 𝑡𝑎 ], 𝑡=0 d𝑠 𝑗
and From (8), (7) is rewritten as
Pr[𝑡𝑇 > 𝑡𝑠 + 𝑡𝑎 ] = 𝑛𝑎 −1
∞ 𝑡𝑇 𝑡𝑇 −𝑡𝑎 λ𝑎 𝑗 𝑑.(𝑗) 𝑓𝑇∗ (𝑠)
𝐴=1− ∑ ( ) (−1)𝑗 [ ]|
∫ ∫ ∫ 𝑓𝑇 (𝑡𝑇 )𝑓𝐸 (𝑡𝑎 , 𝑛𝑎 , λ𝑎 ) 𝑓E (𝑡𝑠 , 𝑛𝑠 , λ𝑠 )𝑑𝑡𝑠 𝑑𝑡𝑎 𝑑𝑡𝑇 𝑗! d𝑠 𝑗
𝑡𝑇 =0 𝑡𝑎 =0 𝑡𝑠 =0 𝑗=0 𝑠=λ 𝑎
𝑛𝑎 −1
(2) (−λ𝑎 ) 𝑗
𝑑.(𝑗) 𝑓𝑇∗ (𝑠)
In (2), if λ𝑎 ≠ λ𝑠 and without loss of generality, assume that =1− ∑ [ ][ ]| (9)
𝑗! d𝑠 𝑗
λ𝑎 > λ𝑠 , then we have 𝑗=0 𝑠=λ𝑎
𝑡𝑇 −𝑡𝑎 From (6),
∫ 𝑓𝐸 (𝑡𝑠 , 𝑛𝑠 , λ𝑠 )𝑑𝑡𝑠 𝑛𝑠 −1 𝑗
𝑡𝑠 =0 λ𝑠 𝑗 𝑗 ∞
𝑛𝑠 −1 𝐵= ∑( )∑( )∫ 𝑓 (𝑡 )
λ𝑠 𝑗 (𝑡𝑇 − 𝑡𝑎 )𝑗 𝑒 −λ𝑠 (𝑡𝑇−𝑡𝑎) 𝑗! 𝑖 𝑡𝑇=0 𝑇 𝑇
𝑗=0 𝑖=0
=1− ∑ [ ] 𝑡𝑇
𝑗!
𝑗=0 ×∫ 𝑓𝐸 (𝑡𝑎 , 𝑛𝑎 , λ𝑎 ) 𝑡𝑇 𝑗−𝑖 𝑒 −λ𝑠𝑡𝑇 (−𝑡𝑎 )𝑖 𝑒 λ𝑠 𝑡𝑎 𝑑𝑡𝑎 𝑑𝑡𝑇
𝑛𝑠 −1 𝑗 𝑡𝑎 =0
𝑗 −λ𝑠 (𝑡𝑇 −𝑡𝑎 )
λ𝑠 𝑒 𝑗 𝑛𝑠 −1 𝑗
=1− ∑ [ ] ∑ ( ) 𝑡𝑇 𝑗−𝑖 (−𝑡𝑎 )𝑖 λ𝑠 𝑗 𝑗 ∞
𝑗! 𝑖 = ∑( ) ∑ ( ) (−1)𝑖 ∫ 𝑓𝑇 (𝑡𝑇 )𝑡𝑇 𝑗−𝑖 𝑒 −λ𝑠𝑡𝑇
𝑗=0 𝑖=0
𝑛𝑠 −1 𝑗 𝑗! 𝑖 𝑡𝑇 =0
𝑗=0 𝑖=0
λ𝑠 𝑗 𝑗 𝑡𝑇
=1− ∑ ( ) ∑ ( ) 𝑡𝑇 𝑗−𝑖 𝑒 −λ𝑠 𝑡𝑇 (−𝑡𝑎 )𝑖 𝑒 λ𝑠𝑡𝑎 (3)
𝑗! 𝑖 ×∫ 𝑓𝐸 (𝑡𝑎 , 𝑛𝑎 , λ𝑎 ) 𝑡𝑎 𝑖 𝑒 λ𝑠 𝑡𝑎 𝑑𝑡𝑎 𝑑𝑡𝑇 (10)
𝑗=0 𝑖=0 𝑡𝑎 =0
Substitute (3) into (2) to yield In (10), we have
∞ 𝑡𝑇 𝑡𝑇
Pr[𝑡𝑇 > 𝑡𝑠 + 𝑡𝑎 ] = ∫ ∫ 𝑓𝑇 (𝑡𝑇 )𝑓𝐸 (𝑡𝑎 , 𝑛𝑎 , λ𝑎 ) 𝑑𝑡𝑎 𝑑𝑡𝑇 ∫ 𝑓𝐸 (𝑡𝑎 , 𝑛𝑎 , λ𝑎 ) 𝑡𝑎 𝑖 𝑒 λ𝑠 𝑡𝑎 𝑑𝑡𝑎
𝑡𝑇 =0 𝑡𝑎 =0 𝑡𝑎 =0
∞ 𝑡𝑇
−∫ ∫ 𝑓𝑇 (𝑡𝑇 )𝑓𝐸 (𝑡𝑎 , 𝑛𝑎 , λ𝑎 )
𝑡𝑇
λ𝑎 𝑛𝑎 𝑡𝑎 𝑛𝑎−1 𝑒 −λ𝑎 𝑡𝑎 𝑖 λ 𝑡
=∫ [ ] 𝑡𝑎 𝑒 𝑠 𝑎 𝑑𝑡𝑎
𝑡𝑇 =0 𝑡𝑎 =0 𝑡𝑎 =0 (𝑛𝑎 − 1)!
𝑛𝑠 −1 𝑗
λ𝑠 𝑗 𝑗
𝑡𝑇
λ𝑎 𝑛𝑎 𝑡𝑎 𝑛𝑎+𝑖−1 𝑒 −(λ𝑎 −λ𝑠 )𝑡𝑎
×[∑ ( ) ∑ ( ) 𝑡𝑇 𝑗−𝑖 𝑒 −λ𝑠 𝑡𝑇 (−𝑡𝑎 )𝑖 𝑒 λ𝑠𝑡𝑎 ] 𝑑𝑡𝑎 𝑑𝑡𝑇 =∫ [ ] 𝑑𝑡𝑎
𝑗! 𝑖 𝑡𝑎 =0 (𝑛𝑎 − 1)!
𝑗=0 𝑖=0
λ𝑎 𝑛𝑎 (𝑛𝑎 + 𝑖 − 1)!
=𝐴−𝐵 (4) =[ ]
where (λ𝑎 − λ𝑠 )𝑛𝑎+𝑖 (𝑛𝑎 − 1)!
∞ 𝑡𝑇 𝑡𝑇
(λ𝑎 − λ𝑠 )𝑛𝑎 +𝑖 𝑡𝑎 𝑛𝑎+𝑖−1 𝑒 −(λ𝑎−λ𝑠 )𝑡𝑎
𝐴=∫ ∫ 𝑓𝑇 (𝑡𝑇 )𝑓𝐸 (𝑡𝑎 , 𝑛𝑎 , λ𝑎 ) 𝑑𝑡𝑎 𝑑𝑡𝑇 (5) ×∫ [ ] 𝑑𝑡𝑎
𝑡𝑇 =0 𝑡𝑎 =0 𝑡𝑎 =0 (𝑛𝑎 + 𝑖 − 1)!
and
11
2169-3536 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2019.2905017, IEEE Access
𝑗=0
𝑗! 𝑖=0 𝑖 (λ𝑎 − λ𝑠 )𝑛𝑎+𝑖 (𝑛𝑎 − 1)! Let 𝑡𝑑 = 𝑡𝑎 + 𝑡𝑠 . In (2), if λ𝑎 = λ𝑠 = λ , then from the
× (𝐶 − 𝐷) (12) convolution of Erlang distributions, 𝑡𝑑 also has an Erlang
where distribution with the density function 𝑓𝐸 (𝑡𝑑 , 𝑛𝑠 + 𝑛𝑎 , λ) .
∞ Therefore, Pr[𝜏𝑑,3 > 𝜏𝑑,2 ] = Pr[𝑡𝑇 > 𝑡𝑠 + 𝑡𝑎 ] = Pr[𝑡𝑇 >
𝐶=∫ 𝑓𝑇 (𝑡𝑇 )𝑡𝑇 𝑗−𝑖 𝑒 −λ𝑠 𝑡𝑇 𝑑𝑡𝑇 (13) 𝑡𝑑 ], where
𝑡𝑇 =0 ∞ 𝑡𝑇
and Pr[𝑡𝑇 > 𝑡𝑑 ] = ∫ ∫ 𝑓𝑇 (𝑡𝑇 ) 𝑓𝐸 (𝑡𝑑 , 𝑛𝑠 + 𝑛𝑎 , λ)𝑑𝑡𝑑 𝑑𝑡𝑇
𝑛𝑎 +𝑖−1 𝑡𝑇 =0 𝑡𝑑 =0
∞
𝐷= ∑ ∫ 𝑓𝑇 (𝑡𝑇 )𝑡𝑇 𝑗−𝑖 𝑒 −λ𝑠𝑡𝑇 which has the same format as (5), and directly from (9), we
𝑘=0 𝑡 𝑇 =0 have
(λ𝑎 − λ𝑠 )𝑘 𝑡𝑇 𝑘 𝑒 −(λ𝑎 −λ𝑠 )𝑡𝑇 Pr[𝑡𝑇 > 𝑡𝑑 ]
× [ ] 𝑑𝑡𝑇 (14) 𝑛𝑠 +𝑛𝑎 −1
𝑘! (−λ) 𝑗 𝑑.(𝑗) 𝑓𝑇∗ (𝑠)
=1− ∑ [ ][ ]| (18)
Equation (13) is rewritten as 𝑗! d𝑠 𝑗 𝑠=λ
𝑗=0
𝑑.(𝑗−𝑖) 𝑓𝑇∗ (𝑠)
𝐶 = (−1) 𝑗−𝑖 [ ]| (15) Since 𝑓𝑇 (𝑡𝑇 ) is approximated as a Gamma distribution with
d𝑠 𝑗−𝑖 𝑠=λ the shape parameter 𝛼 and the scale parameter β, its Laplace
𝑠
In (14), Transform is expressed as
𝑛𝑎 +𝑖−1 ∞ β𝛼
(λ𝑎 − λ𝑠 )𝑘 𝑑.(𝑗+𝑘−𝑖) 𝑓𝑇∗ (𝑠) 𝑓𝑇∗ (𝑠) = ∫ 𝑓𝑇 (𝑡𝑇 ) 𝑒 −s𝑡𝑇 𝑑𝑡𝑇 = (19)
𝐷= ∑ [ ] (−1) 𝑗+𝑘−𝑖 [ ]| 𝑠=0 (s + β)𝛼
𝑘! d𝑠 𝑗+𝑘−𝑖 𝑠=λ
𝑘=0 𝑎 and (18) is re-written as
(16) Pr[𝑡𝑇 > 𝑡𝑑 ]
From (12), (15) and (16), we have 𝑛𝑠 +𝑛𝑎 −1
𝑛𝑠 −1 𝑗
𝑛𝑎
𝛼+𝑗−1 λ𝑗 β𝛼
(−λ𝑠 ) 𝑗
𝑗 λ𝑎 (𝑛𝑎 + 𝑖 − 1)! =1− ∑ ( )[ ] (20)
𝐵= ∑[ ]∑( )[ ] 𝑗 (λ + β)𝛼+𝑗
𝑖 (λ𝑎 − λ𝑠 )𝑛𝑎+𝑖 (𝑛𝑎 − 1)! 𝑗=0
𝑗=0
𝑗! 𝑖=0
12
2169-3536 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/ACCESS.2019.2905017, IEEE Access
13
2169-3536 (c) 2018 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.