Next Article in Journal
Robust Localization-Guided Dual-Branch Network for Camouflaged Object Segmentation
Previous Article in Journal
Decentralized Predictor Stabilization for Interconnected Networked Control Systems with Large Uncertain Delays and Event-Triggered Input
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Smart Aquaponics: An Automated Water Quality Management System for Sustainable Urban Agriculture

1
College of Engineering, Science and Environment, University of Newcastle, Callaghan, NSW 2308, Australia
2
Engineering Cluster, Singapore Institute of Technology, Singapore 138683, Singapore
*
Author to whom correspondence should be addressed.
Electronics 2024, 13(5), 820; https://doi.org/10.3390/electronics13050820
Submission received: 22 January 2024 / Revised: 10 February 2024 / Accepted: 19 February 2024 / Published: 20 February 2024
(This article belongs to the Section Circuit and Signal Processing)

Abstract

:
As the demand for high-quality food rises, especially amidst the COVID-19 pandemic and the continuous development of society meaning that people demand to eat well, ensuring food security has become increasingly urgent. Agricultural technology is evolving, with aquaponic systems emerging as a promising solution to urban food needs. However, these systems present challenges, such as maintaining optimal water quality and minimizing environmental control errors. In this study, we propose a comprehensive approach combining a literature review and controlled experiments. Through the literature review, the recent findings on water management and sustainability in food production were analyzed, providing crucial insights for enhancing aquaponic system performance. Building on this, a series of experiments were conducted to develop and test a water quality management system using PID control. The integration of PID control showed good performance and reduced errors in SIMULINK, and we applied three controls to manage the stability and responsiveness of the aquaponic system. The optimal values obtained from the controller of the vegetable tank system were 4,706,691,503 and −174.418; for the fish tank, they were 36,167, 0.00126, and −174.418; and for the heater system, they were 4.761, 0.0488, and −31.88. This solution is expected to be responsive and provide stable control over various variables.

1. Introduction

The Food Agency article from 3 March 2021 highlights how the COVID-19 pandemic has disrupted Singapore’s food supply, which is largely reliant on imports due to limited local resources. To combat this, Singapore has urged citizens to support local produce and has invested in innovative farming technologies like hydroponics and aquaculture to boost high-quality food production [1,2,3,4,5]. Furthermore, these methods are recognized as organic farming methods due to their avoidance of pesticides. This project explores an aquaponic system that merges aquaculture with hydroponics in a symbiotic relationship, thus optimizing water use. Mutualism symbiosis is implemented between hydroponics ponds [6,7,8,9,10,11,12] that allow clean water for fish habitats and fish tanks that provide nutrients that are distributed to hydroponics through fertigation [13,14]. The system must be a balanced environment, where water quality is paramount. Monitoring the pH, temperature, water level, total dissolved solids, and turbidity is crucial to maintaining this balance. The purpose of this proposed work is to develop a water quality management system using PID control for a smart aquaponic system [15]. Utilizing the PIC18F4550 microcontroller for the integrated management of sensors and actuators, the stable system was designed to ensure optimal conditions for both fish and plants. Through real-time monitoring and alerts, coupled with Wi-Fi-enabled control via the ESP822 module, the system promises enhanced management capabilities, ensuring the health and productivity of the aquaponic setup. Research for managing water quality in treatment plants has intensified due to its substantial potential to enhance operational efficiency, ensure regulatory compliance, and improve overall water treatment effectiveness [16,17,18]. Simultaneously, research efforts [19,20,21,22,23,24,25,26,27,28,29,30] have concentrated on refining water management control. In the realm of aquaponics, where water plays a pivotal role, the research paper [29] offers a succinct overview of the proposed solutions in the literature. Its objective is to facilitate the adoption of automation and smart technologies in aquaponics systems by simplifying sensor selection based on biological requirements. From another perspective, the research paper [30] discusses the design and management of a wastewater treatment plant with a mechatronic system. The application integrates the components of level sensors, suction and discharge pumps, and heaters in the tank for wastewater treatment. In addition, they established a PID control system for optimizing the wastewater treatment process and ensuring system stability. This literature review [24,25,26,27,28] collectively serves as a fundamental foundation for our project, highlighting the importance of effective water management and the incorporation of advanced technologies to meet our goals of optimizing resource utilization and improving the stability of aquaponic systems. By drawing the insights gained from both studies, our goal is to create a holistic approach that integrates observed practices in water treatment into our aquaponics project. In the following sections, we will learn more about the proposed system and hardware design in Section 2, the measured results are presented in Section 3, the discussion is in Section 4, and the conclusion is given in Section 5.

2. Materials and Methods

2.1. System Design and Control of Aquaponic System

This project designed a model aquaponic system with RDWC, as shown in Figure 1, for indoor space. The manufacturer has a separate tank, which includes a fish tank, tank filter, and hydroponic pond along with foam boards. The size of the fish tank and hydroponic pond are 66 cm × 48.6 cm × 41 cm. The fishpond was filled with groundwater up to 115 L.
Recirculated deep-water culture (RDWC) is a construction method used in aquaponics. Deep-water culture carries the concept of floating vegetables using floating rafts made of foam boards with holes to access vegetable nutrition [3]. The aquaponics system in this study uses the recirculated deep-water culture (RDWC) method with several advantages and disadvantages. This RDWC model provides optimal vegetable growth since the growing space is large, roots hang freely, and it is easy to clean and maintain. The disadvantage is the float rafts that affect air circulation in water the, thus harming the root vegetables. To ensure the health of the root vegetables, there are some ways to counter the problem, such as maintaining the water level to prevent the roots from drying out and adding more air circulation. The system is implemented with an ultrasonic water level sensor and an aerator pump to degas carbon dioxide (CO2). Water circulation that continues to flow can reduce the water quality because there will be changes in water turbidity. Turbidity can come from fish metabolism, including feces, urine, and dissolved fish food that settles and dissolves in the water [31]. Water turbidity can cause increased stress on the fish and interfere with the penetration of light into the water. This can disrupt photosynthesis in aquatic plants, resulting in decreased oxygen levels in the water. Low oxygen levels can lead to fish death, harm aquatic ecosystems, and decrease water quality. When the turbidity level increases, it is recommended to change the water. To prevent this, people should regularly monitor water turbidity and take steps to reduce it if necessary. This can include reducing fertilizer use and avoiding activities that could stir up sediment. Additionally, aquatic plants can be planted in areas where they are likely to thrive and help improve water quality.
Vegetables need sufficient nitrate nutrients to grow well. Nitrate can be obtained through the biofilter nitrification process. The nitrification process, as shown in Figure 2, is the process of decomposing ammonia by oxidation into nitrite, and then nitrite is oxidized back into nitrate. Ammonia itself comes from fish activities that produce fish waste. Before the nitrification process, fish waste that enters the mechanical filter settles at the bottom of the filter. The nitrification process will then take place in the biofilter. To optimize water spinach growth, the amount of nutrients in the water must be sufficient, which can be measured by the total dissolved solids (TDS) content [32]. Water spinach total dissolved solids range from 800 to 1000 ppm [32]. Commercial pellet feeds contain 30% protein, which is sufficient for 50% of the nutrients the vegetables require for optimal growth. However, excessive fish feeding can negatively affect the pH level because ammonia and nitrite levels increase it. The pH level in the water impacts the growth and life of the vegetables, fish, and bacteria [6]. The pH level provides an indication of the acidity or alkalinity of the water, which can have a direct effect on how well the plants and animals can survive in the water. Too much acid or alkali in the water can be toxic to many organisms, so it is important to maintain a neutral pH level if possible. For example, catfish have a pH range of 6–9, which means they can tolerate both acidic and alkaline water. In contrast, water spinach has a pH range of 5.6–6.5, which means it can only tolerate acidic water. The two species can coexist if the water pH is acidic, but not the other way around, as the water spinach can die if the water pH is alkaline.
An aquaponic system must be monitored regularly with sensors and adjusted when necessary to ensure the proper functioning of the system and the health of the vegetables, fish, and bacteria. The pH level can be affected by a wide range of factors, including the amount of fish food consumed and the temperature [12,32]. The increase in temperature encourages this reaction by increasing molecular ionization and producing more hydrogen ions (H+), causing the pH in the water to become acidic. In this case, controlling the water temperature manually is less effective, so a temperature sensor is needed to help monitor the water temperature.

2.2. PID-Controlled Water System

The automated aquaponics system in this study used sensors and machines to control and monitor the water quality. In the monitoring systems in the fish tanks, pH, ultrasonic, temperature, water turbidity, and total dissolved solids sensors were installed. The control system installed in the fish tank included an automatic fish feeder, an ultrasonic sensor, a DC 12 V water pump, a water heater, an aerator pump, and lights. The hydroponic pond monitoring system placed sensors for the water’s pH, temperature, and total dissolved solids. Then, the timer system installed in the hydroponic pond provided the garden light control and the aerator machine. All sensors and actuators were integrated into a microcontroller that configured the network to transmit status data and allow the user to configure the aquaponic system. The specifications of the tools used in this project are shown in Table 1.

2.3. Overall Hardware Design

Motor pumps were used in the system that required work to control the water level for the two tanks. The height of each tank had a different level set point, and the system had to be capable of adjusting itself to maintain the certain level in the constant recirculation. The motor pump was driven to move at a certain speed, which needed feedback that could read the current level of water. This system had multiple inputs, such as pH, ultrasonic, TDS, turbidity, and temperature sensors, and multiple outputs, such as a motor pump, water heater, valve, fish feeder, and aerator. The system had to be able to automatically adjust the parameters based on the readings from the sensors. The system also had to be able to alert the user if any of the levels were out of the range of the acceptable limit. We used a smaller-scale tank with a volume of 40 L, measuring 47.5 × 32.8 × 26 cm. There was a difference in the volume of water between the two tanks, with the vegetable tank having a volume of 18.35 L and the fish tank having 24.6 L and an average height of 20 cm. Model-based design uses simulation to optimize controller gains during the initial system design process. With the software, a stable operating point is determined by balancing mass and energy. In this paper, the performance of PID controllers was investigated to control the liquid level in the tank. Simulations of the processes were performed using MATLAB SIMULINK.

2.4. Mathematicial Modelling

The mathematical model of the liquid level in a tank was derived using a mass balance. The model controls the flow rate of liquid in the tank. The model can be used to predict how the liquid level will change over time. It can optimize tank design and operation.
Our aquaponic system is shown in Figure 3. Here, qin is the rate of water entering the tank, qout is the rate of water exiting the tank, and A is the area of the tank. The resistance of the flowing liquid from the exhaust pipe and the capacitance of the level tank are calculated as follows.
Assuming that the inlet and outlet flow rate density is constant, then
R = C h a n g e   i n   w a t e r   l e v e l   c m f l o w   o f   t h e   l i q u i d   c m 3 s = h q 0
C = C h a n g e   i n   S t o r e d   l e v e l   c m 3 c h a n g e   i n   l e v e l   i n   h e i g h t   c m = d V d h = A d h d h = A   c m 2
If the level tank is assumed as linear,
q i q 0 = C d h d t
The output flow rate is
q 0 = ρ g h R
Therefore, substituting Equation (4) into Equation (3), we obtain the following:
q i ρ g h R = C d h d t
R C d h d t + h = R q i
which is the differential equation relating the fluid level in the tank to the flow rate into the tank at time (t). Referring to Table 2 and Table 3 and taking the Laplace transform for both sides of equation, the final transfer function of the water level control process is estimated as follows:
G s y s s = H s Q i s = R s R C s + 1
The final transfer function of the tank is shown as follows:
G s y s s = H s Q s = 0.036 s 56.1 S + 1
The mathematical model of water tank was derived using a mass and energy balance. There was one variable power electrical input and one variable temperature output on the tank [2]. The following assumptions were made:
  • The density and heat capacity of the water are constant.
  • The temperature of the inlet water tank is constant (27 °C).
  • The level of water in the tank is constant.
  • The cross-sectional area of the tank is constant.
  • The heat losses to the surroundings are neglected.
From the energy balance around the tank, we obtain:
ρ . c p . Q i . θ i + Q ρ . c p . Q o . θ = d m . c p . θ d t
Since m = ρ . A . h , then
ρ . c p . Q i . θ i + Q ρ . c p . Q o . θ = ρ . A . h . c p . d θ d t
Q i . T i + Q ρ . c p Q o . θ = A . h d θ d t
Q i Q o . θ i + Q ρ . c p . Q o θ = A . h Q o d θ d t
For the steady-state condition, Q i = Q o . Then
A . h Q o d θ d t + θ i = Q ρ . c p . Q o + θ
Assuming the temperature θ i = constant, then
A . h Q o s + 1 + θ s = Q s ρ . c p . Q o
G s = θ s Q s = 1 ρ . c p . Q o A . h Q o s + 1
G s = θ s Q s = 3.31 × 10 3 s 1612 s + 1
From Equations (10)–(15), the transfer function obtained from the mathematical modeling was used to design the PID controller using the SIMULINK MATLAB software.

2.5. PID Water Level Control Process

The PID controller, as shown in Figure 4, obtains the water level in the tank as an input and compares it with the current reference level value. The PID controller generates a control signal based on the error value and transmits the value to the pump. The pump is turned on according to the control signal and pumps into the vegetable tank. In case of a disturbance effect, the discharge valve was turned on, and the water level was adjusted in both the fish tank and vegetable tank. For example, if the water level in the vegetable tank increased due to an unexpected increase in the water supply, the PID controller would detect the increase and the discharge valve would be opened to redirect the extra water to the fish tank. Basically, the water level control loop on the tanks was used to maintain the water level at the desired level controlled by the PID controller [5].
In Figure 5, three sections of PID controls are depicted: part number 1 represents the vegetable tank, part number 2 denotes the fish tank, and part number 3 is designated for heater control. The vegetable tank regulated the TDS and pH levels for the vegetables, while the fish tank maintained the temperature, turbidity, and pH for the fish. The heater control ensured that the tanks remained at the desired temperature. Modeling them separately would better capture the system’s behavior, enabling a thorough analysis of the performance of the aquaponic systems under different conditions and scenarios, including changes in load or environmental parameters.
Figure 6, Figure 7 and Figure 8 show the PID for the vegetable tank, fish tank, and water heater, respectively. In our aquaponic system, we utilized a comprehensive approach to PID controller tuning, utilizing both the PID Tuner App and manual tuning techniques. The PID Tuner App facilitated an initial setup by automatically determining suitable proportional, integral, and derivative gains based on the system’s response characteristics. Subsequently, manual tuning was implemented to fine-tune these parameters, considering the nonlinear system of the aquaponic environment. In conducting the manual tuning, we needed to test various range values or the tolerance of the aquaponic environment on the sensor to observe the system’s response. The adjustments commenced by gradually increasing the proportional gain (Kp) until the system initiated vibrations. This point of oscillation indicated that the system was unstable, and the proportional gain at this juncture was documented as Kp_critical. Subsequently, the integral (Ki) gain was augmented until any steady-state error was eradicated, and derivative (Kd) gains were fine-tuned to prevent overshooting and to reduce the settling time. This dual strategy ensured the system remained stable and promoted a balance conducive to water quality maintenance and overall system stability.

2.6. Hardware Design

In the block diagram integration control system, shown in Figure 9, the microcontroller (PIC18F4550) functioned as the brains of the system, all the input data from the sensor were processed, and the result provided the decision to the actuator towards a certain condition. There were several actuators which were integrated in the system, including a DC water pump, solenoid water valve, water heater, and automated fish feeder. More detail about how the system worked can be seen in the software flowchart in Section 2.7. Figure 10 shows an overview of the circuit diagram by providing a comprehensive snapshot of the electrical components and connections of this proposed work.
A.
pH (pondus hydrogenii) sensor
The pH sensor in aquaponics, specifically the SEN0161 model, is key for monitoring water’s acidity or alkalinity, which is crucial for fish and plant health. It works by measuring hydrogen ion exchange and translating pH changes into voltage shifts, allowing for precise calibration and real-time pH adjustments. This ensures optimal conditions for the aquaponic system, promoting healthy growth and system reliability. The sensor reading starts from 0 to 14 in a response time of < 1 min. This particular sensor was chosen to ensure that it had a high precision and fast response time. This was because the real-time monitoring and adjusting of an aquaponic system’s water pH levels is critical to ensuring optimal conditions for aquatic life and plants, thus preventing stress and promoting healthy growth.
B.
Water level sensor
This was selected for its durability and accuracy in detecting water levels, which was critical for preventing overflow or dry-run conditions that could harm the system’s aquatic life. It prevents water overflow or depletion, safeguarding aquatic life and plant roots from damage, thereby ensuring consistent system stability. The sensor reading starts from 2–400 cm with a response time of 100 ms and an accuracy of 3 mm. To keep a constant accuracy, calibration can be carried out.
C.
Temperature sensor
The temperature sensor features a high sensitivity and quick readings, enabling the effective monitoring of the water temperature to maintain conditions ideal for fish and plant growth, contributing to the system’s efficiency. It enables the maintenance of ideal water temperatures for fish and plant health, essential for maximizing growth rates and yield, thus contributing to the system’s overall efficiency. The LM35 sensor was chosen because it has a reading range from −50 °C to 150 °C, and its accuracy is ±0.5 °C at 25 °C.
D.
Turbidity sensor
This provides reliable measurements of water clarity, which is essential for assessing the quality of the water and the effectiveness of the filtration system, thus enhancing the system’s reliability. It also helps in monitoring the cleanliness of the water, ensuring the effectiveness of the filtration system and preventing disease outbreaks, thus enhancing the sustainability of the ecosystem. The SEN0189 sensor was selected, and it has a measurement range of 0–3000 NTU.
E.
Total dissolved solids sensor
With its high accuracy, it monitors the nutrient levels in the water, ensuring the plants receive the correct amount of nutrients for optimal growth, contributing to the system’s effectiveness. It ensures that the plants receive the optimal amount of nutrients without the risk of over- or underfeeding, which is crucial for healthy plant growth and reduced water pollution. The SEN0244 sensor was selected, which has a measurement range of 0–1000 ppm.
F.
LCD
The LCD 1602A device was chosen because of its ability to display readings, data, and operational statuses clearly and effectively with display formats of 16 characters × 2 lines. It provides a direct, user-friendly interface for displaying real-time data such as water temperature, pH levels, water level, temperature level, turbidity level, and total dissolved solids parameters. This instant feedback allows for timely adjustments and interventions, ensuring that the aquaponic environment is maintained at optimal conditions. By offering clear visibility of system statuses and alerts, the LCD enhances the overall manageability and reliability of the system, allowing operators to prevent potential issues before they escalate.
G.
LED grow light
Chosen for its optimized spectrum for red and blue plant growth, it provides consistent and suitable light conditions for crop production throughout the year, increasing the system’s productivity.
H.
Water and aerator pump
These were selected for their reliability and efficiency in oxygenating the water and circulating nutrients, crucial for fish health and plant growth, thus ensuring the system’s stability for fish health and nutrient absorption by plants.
I.
Fish feeder automation
Timed feeding controls enhance the system’s sustainability and efficiency by mitigating overfeeding, consequently promoting sustainable fish growth and minimizing the necessity for frequent water changes.
J.
PIC18F4550 microcontroller
This device provides robust control with its reliable performance and flexibility in programming, central to integrating and managing the system’s sensors and actuators.
K.
Relay
The relay provides reliable switching capabilities for the electrical components of the system, ensuring the safe and effective operation of devices such as pumps and heaters, thereby contributing to system’s safety and robustness.
L.
Water heater
This ensures that the water temperature is maintained within an optimal range, critical for the health of both fish and plants, thus contributing to the system’s stability. It maintains the water temperature within a species-specific optimal range from 25 °C to 30 °C, crucial for preventing stress on fish and ensuring plant health, thus directly impacting the system’s productivity.
M.
Solenoid valve
This provides control over the water flow, essential for maintaining optimal water levels and flow rates within the system, thereby preventing water stagnation and changing the fresh water. This enhancement promotes both plant growth and aquatic health.
N.
ESP8266 Wi-Fi
This provides remote monitoring and control, providing real-time data access and alerts, thus increasing the system’s manageability and responsiveness. It provides real-time access to system data and alerts, allowing for immediate adjustments from anywhere, thus improving system management and responsiveness to environmental changes.

2.7. Software Flowchart

The flow chart shown in Figure 11, Figure 12, Figure 13, Figure 14, Figure 15 and Figure 16 is the algorithm of the sequence of operation of the device. With this logic, the system was designed for maintaining the conditions necessary for the fish and plants within the aquaponic system to survive. In this segment, the system details are displayed separately and are divided into two parts, namely the main flowchart and function flowchart for each sensor. The main flowchart provides an overview of the system, while the function flowchart explains the operation of each sensor. When the system starts, some devices converge at the beginning. The LCD displays a WELCOME message, signifying that the system has successfully started and is ready to proceed to the next stage. After this, the system establishes a connection with Wi-Fi. Once Wi-Fi connectivity is established, the system initiates measurement and a series of actions until the process is complete. After this process, the system uploads the results to the cloud whilst waiting for a response. If the cloud response is positive, the system will advance to the next stage; otherwise, it will repeat the process until a positive response is received. Once the data are uploaded to the cloud, the system enters a defined waiting period before restarting the measurement process.

3. Results

Throughout the project, each component was tested independently. This was carried out to ensure that each component was working properly and as expected when integrated into the system. As each component passed its individual tests, it was then added together to the overall design, as shown in Figure 17, and tested to ensure proper functionality. In the coding, we used the PID calculation results and converted them to a duty cycle. Then, the PWM from the PIC18F4550 device was used to control the BLDC motor speed, aeration pump, and heater.

4. Discussion

The following tests were conducted to obtain the PID values for the vegetable tank, fish tank, and heater and results shown in Table 4, Table 5 and Table 6.
The following values were used in the SIMULINK MATLAB software:
A.
For the vegetable tank
Figure 18 shows the PID controllers tuned by the values of proportional gain = 47.1, integral gain = 1.5, and derivative gain = 174.4 to minimize overshoot errors. In the simulation, the height of the vegetable tank reached the desired level of 15 cm. As shown in the diagram, there was an overshoot of 1.07%, and it took 200 s for it to stabilize.
B.
For the fish tank
Figure 19 shows that the PID controllers that were tuned by the values of proportional gain = 30, integral gain = 0.5, and derivative gain = 174 could reduce the overshoot error. Based on the simulations, the final height of the fish tank was determined to be 20 cm. As shown in the diagram, there was no overshoot, and it stabilized after 250 s.
C.
For the water heater
Figure 20 shows the PID controllers that were tuned by the values of proportional gain = 4.761, integral gain = 0.0488, and derivative gain = −31.88. The value of the heater in the water tank could reach the desired level of 30 degrees Celsius in the simulation. As shown in the diagram, there was an overshot of 1.13%, and it took 350 s to stabilize. The simulation results generated using SIMULINK offer initial insights into the control of automated aquaponics systems, although it is recognized that there is significant uncertainty regarding the total accuracy of these results. Technical limitations, including difficulties in implementing complex aquaponics models into the SIMULINK environment, and hardware constraints that limited physical experimentation have precluded an empirical validation of these simulations. However, these findings indicate promising areas for future research, particularly in the development and verification of more robust simulation models. Further research that focuses not only on technical improvements but also on empirical experiments is urgently needed to ensure the reliability and practical applicability of this automated aquaponics system in the context of sustainable urban agriculture.
The proposed system integrates both a review of the existing literature and controlled experiments, thus facilitating a thorough comprehension of the prevailing challenges and the formulation of practical remedies. While previous methodologies may have concentrated solely on theoretical examination or practical experimentation, this approach amalgamates both aspects to attain a more holistic understanding and implementation. Moreover, the increased emphasis on water management and the sustainability of food production constitutes a notable enhancement. Although preceding systems may have partially addressed water quality, this system appears to delve deeper into recent discoveries and insights, thereby potentially leading to more efficacious solutions for preserving the optimal water quality in aquaponic systems. The incorporation of PID control represents a significant advancement in the management of environmental control errors. PID control is a widely acknowledged and efficient technique for achieving stability and responsiveness in control systems. By employing PID control to regulate various variables within the aquaponic system, the proposed solution endeavors to enhance performance and minimize errors compared to previous approaches that may have employed simpler control methods or lacked precise control mechanisms altogether. The mention of obtaining optimum values for each controller (vegetable tank, fish tank, and heater system) indicates a tailored approach to optimization. Earlier systems [19,20,21,22,23,24,25,26] may have employed generic control settings or overlooked the significance of fine-tuning control parameters for specific components within the aquaponic system. By optimizing the parameters for each subsystem, the proposed system is likely to achieve a superior overall performance and efficiency. The concluding statement pertaining to the expected responsiveness and stability of the proposed control system signifies a high degree of confidence in its efficacy. While previous approaches [27,28,29,30] may have encountered difficulties in maintaining consistent performance or responding promptly to fluctuations, this system anticipates overcoming such challenges through its integrated approach and precise control mechanisms. In summary, the proposed system distinguishes itself by presenting a comprehensive approach, focusing on water management and sustainability, utilizing advanced PID control, optimizing parameters for specific components, and striving for improved responsiveness and stability. These distinctions collectively position the proposed system as a promising advancement in aquaponic technology, potentially addressing the key challenges faced by previous approaches.

5. Conclusions

Significantly, the application of PID control improved the responsiveness of the system, allowing for better adjustment and more stable control over critical variables that affect the health and growth of biotic components. This control was programmed to provide a fast and precise response to the dynamic and nonlinear characteristics of the water tank in all aspects of the operating conditions. From the simulations obtained, this adaptability ensured that the environmental parameters inside the tank consistently conformed to the pre-determined optimal levels for sustainable aquaculture and agricultural practices. This harmonious integration of aquaculture and hydroponics presents a forward-thinking approach to agriculture, promising a resilient and resource-efficient method for producing food in a variety of environments. The strategic application of technology in this system underscores its potential to revolutionize urban agricultural practices, making it a cornerstone for sustainable living and a model for future agricultural innovation. Looking ahead, refining PID control algorithms for better efficiency and accuracy is crucial. Future efforts should aim at integrating advanced control strategies, like adaptive PID controls or machine learning, to allow the system to automatically fine-tune its settings in real-time based on predictive modelling and data trends. In this way, aquaponic systems could be greatly automated and boosted in terms of robustness, sustainability, and improving productivity and resource efficiency.

Author Contributions

Conceptualization, Resources, Software, and Supervision, C.L.K.; Methodology, Data Curation, and Investigation, I.M.B.P.K.; Methodology, Visualization, and Formal Analysis, Y.Y.K.; Supervision and Funding Acquisition, H.T.; Supervision and Funding Acquisition, A.B.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data presented in this study are available in this article.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Pasha, A.K.; Mulyana, E.; Hidayat, C.; Ramdhani, M.A.; Kurahman, O.T.; Adhipradana, M. System Design of Controlling and Monitoring on Aquaponic Based on Internet of Things. In Proceedings of the 2018 4th International Conference on Wireless and Telematics (ICWT), Nusa Dua, Indonesia, 12–13 July 2018; pp. 1–5. [Google Scholar] [CrossRef]
  2. Mahmood, Q.A.; Nawaf, A.T.; Esmael, M.N.; Abdulateef, L.T.; Dahham, O.S. PID Temperature Control of Demineralized Water Tank. IOP Conf. Ser. Mater. Sci. Eng. 2018, 454, 012031. [Google Scholar] [CrossRef]
  3. CarlBroadbent. NFT vs. Dwc Aquaponics: Which Is Better? Gardenia Organic. 18 October 2021. Available online: https://gardeniaorganic.com/nft-vs-dwc-aquaponics/ (accessed on 15 February 2023).
  4. Defa, R.P.; Ramdhani, M.; Priramadhi, R.A.; Aprillia, B.S. Automatic controlling system and IOT based monitoring for ph rate on the aquaponics system. J. Phys. Conf. Ser. 2019, 1367, 012072. [Google Scholar] [CrossRef]
  5. Erguzel, T.Y. A Hybrid PSO-PID Approach for Trajectory Tracking Application of a Liquid Level Control Process. Int. J. Optim. Control. Theor. Appl. 2015, 5, 63–73. [Google Scholar] [CrossRef]
  6. Kitayama, M.; Nguyen, D.T.; Lu, N.; Takagaki, M. Effect of light quality on physiological disorder, growth, and secondary metabolite content of water spinach (Ipomoea aquatica forsk) cultivated in a closed-type plant production system. Korean J. Hortic. Sci. Technol. 2019, 37, 206–218. [Google Scholar] [CrossRef]
  7. Fish Tank Heater Tips for Cold Weather. Home. Available online: https://www.aqueon.com/articles/fish-tank-heater-tips-for-cold-weather (accessed on 25 February 2023).
  8. Hitachi, Semiconductor & Integrated Circuits. HD44780U (LCD-II) (Dot Matrix Liquid Crystal Display Controller/Driver); Hitachi, Ltd.: Tokyo, Japan, 1998. [Google Scholar]
  9. Mamatha, M.N.; Namratha, S.N. Design & implementation of indoor farming using automated aquaponics system. In Proceedings of the 2017 IEEE International Conference on Smart Technologies and Management for Computing, Communication, Controls, Energy and Materials (ICSTM), Chennai, India, 2–4 August 2017. [Google Scholar] [CrossRef]
  10. Manju, M.; Karthik, V.; Hariharan, S.; Sreekar, B. Real Time Monitoring of the environmental parameters of an aquaponic system based on internet of things. In Proceedings of the 2017 Third International Conference on Science Technology Engineering & Management (ICONSTEM), Chennai, India, 23–24 March 2017. [Google Scholar] [CrossRef]
  11. Mustapha, M.; Okafor, B.; Olaoti, K.; Oyelakin, O. Effects of three different photoperiods on the growth and body coloration of juvenile African catfish, Clarias gariepinus (Burchell). Arch. Pol. Fish. 2012, 20, 55–59. [Google Scholar] [CrossRef]
  12. Saaid, M.F.; Fadhil, N.S.; Ali, M.S.; Noor, M.Z. Automated indoor aquaponic cultivation technique. In Proceedings of the 2013 IEEE 3rd International Conference on System Engineering and Technology, Shah Alam, Malaysia, 19–20 August 2013. [Google Scholar] [CrossRef]
  13. Al-Kodmany, K. The Vertical Farm: A review of developments and implications for the Vertical City. Buildings 2018, 8, 24. [Google Scholar] [CrossRef]
  14. Sukrismon, Y.; Hidayatullah, N.; Mufti, N.; Handayani, A.N.; Horng, G.J. Smart fish pond for economic growing in catfish farming. In Proceedings of the 2019 International Conference on Computer Science, Information Technology, and Electrical Engineering (ICOMITEE), Jember, Indonesia, 16–17 October 2019. [Google Scholar] [CrossRef]
  15. Setiadi, E.; Taufik, I.; Widyastuti, Y.R.; Ardi, I.; Puspaningsih, D. Improving productivity and water quality of catfish, Clarias sp. cultured in an aquaponic ebb-tide system using different filtration. IOP Conf. Ser. Earth Environ. Sci. 2019, 236, 012026. [Google Scholar] [CrossRef]
  16. Suwandi, B.; Istianto, Y.; Nugroho, B.; Taufik, N.; Azhari, S.; Astawa, I.M.; Adi Marianto, F.; Ma’arif, R.A.; Hanifa, R. Development of a low-cost TDS sensor using an electric plug with the curve fitting method approaches. In Proceedings of the 2022 International Conference on Radar, Antenna, Microwave, Electronics, and Telecommunications (ICRAMET), Bandung, Indonesia, 6–7 December 2022. [Google Scholar] [CrossRef]
  17. Singapore: Food Security Despite the Odds. Food for Thought. Available online: https://www.sfa.gov.sg/food-for-thought/article/detail/singapore-food-security-despite-the-odds (accessed on 21 March 2023).
  18. Vito Nanda, C.; Nur Khozin, M. Cultivation of water spinach using a hydroponic system at different AB mix concentrations. J. Soilscape Agric. 2022, 1, 1–6. [Google Scholar] [CrossRef]
  19. Samba, N.; Nunomura, O.; Lu, N.; Johkan, M.; Nakano, A.; Tsukagoshi, S. Cucumber (Cucumis sativus L.) Growth and Productivity under Solar Radiation-Based Quantitative Nutrient Management in Hydroponic System. Agronomy 2024, 14, 296. [Google Scholar] [CrossRef]
  20. Lu, Y.; Zhou, T.; Guo, J.; Zhong, J.; Li, D.; Shi, H.; Liu, C.; Xiang, R.; Sun, M. Effects of Substitute Substrate, Water, and Fertilizer Management on the Growth of Potted Chrysanthemums. Horticulturae 2024, 10, 138. [Google Scholar] [CrossRef]
  21. Chaabane, S.; Riahi, K.; Khlifi, S.; Slama, E.; Vanclooster, M. Assessing the Performance of a Citizen Science Based Water Quality Monitoring Program for Nitrates Using Test Strips Implemented in the Medjerda Hydrosystem in Northern Tunisia. Hydrology 2024, 11, 6. [Google Scholar] [CrossRef]
  22. Guo, J.; Jiang, Z.; Chu, X.; Wang, W. Parallel Intelligent Monitoring System of Port Water Quality Based on the ACP Method. J. Mar. Sci. Eng. 2024, 12, 218. [Google Scholar] [CrossRef]
  23. Jakovljevic, G.; Álvarez-Taboada, F.; Govedarica, M. Long-Term Monitoring of Inland Water Quality Parameters Using Landsat Time-Series and Back Propagated ANN: Assessment and Usability in a Real-Case Scenario. Remote Sens. 2024, 16, 68. [Google Scholar] [CrossRef]
  24. Gao, L.; Shangguan, Y.; Sun, Z.; Shen, Q.; Shi, Z. Estimation of Non-Optically Active Water Quality Parameters in Zhejiang Province Based on Machine Learning. Remote Sens. 2024, 16, 514. [Google Scholar] [CrossRef]
  25. Gilbert, K.M.; Shi, Y. Urban Growth Monitoring and Prediction Using Remote Sensing Urban Monitoring Indices Approach and Integrating CA-Markov Model: A Case Study of Lagos City, Nigeria. Sustainability 2024, 16, 30. [Google Scholar] [CrossRef]
  26. Addas, A.; Tahir, M.; Ismat, N. Enhancing Precision of Crop Farming towards Smart Cities: An Application of Artificial Intelligence. Sustainability 2024, 16, 355. [Google Scholar] [CrossRef]
  27. Zhai, B.; Sun, M.; Shen, X.; Zhu, Y.; Li, G.; Du, S. Effects of Stand Density on Growth, Soil Water Content and Nutrients in Black Locust Plantations in the Semiarid Loess Hilly Region. Sustainability 2024, 16, 376. [Google Scholar] [CrossRef]
  28. Masood, M.U.; Rashid, M.; Haider, S.; Naz, I.; Pande, C.B.; Heddam, S.; Alshehri, F.; Elkhrachy, I.; Ahsan, A.; Sammen, S.S. Exploring Groundwater Quality Assessment: A Geostatistical and Integrated Water Quality Indices Perspective. Water 2024, 16, 138. [Google Scholar] [CrossRef]
  29. Yanes, A.R.; Martinez, P.; Ahmad, R. Towards automated aquaponics: A review on monitoring, IOT, and Smart Systems. J. Clean. Prod. 2020, 263, 121571. [Google Scholar] [CrossRef]
  30. Bados, J.S.; Morejon, I.Y. Design of a PID control system for a wastewater treatment plant. In Proceedings of the 2020 3rd International Conference on Robotics, Control and Automation Engineering (RCAE), Chongqing, China, 5–8 November 2020. [Google Scholar] [CrossRef]
  31. Yosmaniar; Pantjara, B.; Setiadi, E. The growth performance and survival rate of catfish (Clarias sp.) that given probiotic controlling nitrogen. IOP Conf. Ser. Earth Environ. Sci. 2020, 521, 012007. [Google Scholar] [CrossRef]
  32. Yuzhakov, M.S.; Kazanin, V.A.; Berzin, A.K.; Kuleshov, G.E.; Badin, A.V.; Filchenko, D.I. IOT based system for real-time monitoring the hydrogen-ion activity in water bodies. J. Phys. Conf. Ser. 2021, 1989, 012021. [Google Scholar] [CrossRef]
Figure 1. Schematic aquaponic design structure with RDWC.
Figure 1. Schematic aquaponic design structure with RDWC.
Electronics 13 00820 g001
Figure 2. Cycle of nitrification.
Figure 2. Cycle of nitrification.
Electronics 13 00820 g002
Figure 3. Scheme of tank system.
Figure 3. Scheme of tank system.
Electronics 13 00820 g003
Figure 4. Schematic of PID controller.
Figure 4. Schematic of PID controller.
Electronics 13 00820 g004
Figure 5. Simulation PID of aquaponic systems.
Figure 5. Simulation PID of aquaponic systems.
Electronics 13 00820 g005
Figure 6. PID SIMULINK of vegetable tank (expanded view of Figure 5), showing the interconnected simulation that was designed to understand and implement a PID controller for optimal conditions in vegetable tank.
Figure 6. PID SIMULINK of vegetable tank (expanded view of Figure 5), showing the interconnected simulation that was designed to understand and implement a PID controller for optimal conditions in vegetable tank.
Electronics 13 00820 g006
Figure 7. PID SIMULINK of fish tank (expanded view of Figure 5), showing the interconnected simulation that was designed to understand and implement a PID controller for optimal conditions in fish tank.
Figure 7. PID SIMULINK of fish tank (expanded view of Figure 5), showing the interconnected simulation that was designed to understand and implement a PID controller for optimal conditions in fish tank.
Electronics 13 00820 g007
Figure 8. PID SIMULINK of water heater (expanded view of Figure 5), showing the interconnected simulation that was designed to understand and implement a PID controller for heater in fish tank.
Figure 8. PID SIMULINK of water heater (expanded view of Figure 5), showing the interconnected simulation that was designed to understand and implement a PID controller for heater in fish tank.
Electronics 13 00820 g008
Figure 9. Block diagram integration component, showcasing how different elements seamlessly come together, offering a student-friendly glimpse into the essential connections that made our project work.
Figure 9. Block diagram integration component, showcasing how different elements seamlessly come together, offering a student-friendly glimpse into the essential connections that made our project work.
Electronics 13 00820 g009
Figure 10. Overview of circuit diagram, providing a comprehensive snapshot of the electrical components and connections of the project.
Figure 10. Overview of circuit diagram, providing a comprehensive snapshot of the electrical components and connections of the project.
Electronics 13 00820 g010
Figure 11. Main system flow chart, illustrating the system progression in this flowchart and detailing the sequential processes crucial for maintaining water quality.
Figure 11. Main system flow chart, illustrating the system progression in this flowchart and detailing the sequential processes crucial for maintaining water quality.
Electronics 13 00820 g011
Figure 12. Flow chart water level control, illustrating the water level control in this flowchart and detailing the sequential processes crucial for maintaining water pH.
Figure 12. Flow chart water level control, illustrating the water level control in this flowchart and detailing the sequential processes crucial for maintaining water pH.
Electronics 13 00820 g012
Figure 13. Flowchart water temperature control, illustrating the temperature control and the sequential processes crucial for maintaining water temperature.
Figure 13. Flowchart water temperature control, illustrating the temperature control and the sequential processes crucial for maintaining water temperature.
Electronics 13 00820 g013
Figure 14. Flowchart of pH control, illustrating the pH control in this flowchart and detailing the sequential processes crucial for maintaining pH of water.
Figure 14. Flowchart of pH control, illustrating the pH control in this flowchart and detailing the sequential processes crucial for maintaining pH of water.
Electronics 13 00820 g014
Figure 15. Flowchart of total dissolved solids, illustrating the total dissolved solids control in this flowchart and detailing the sequential processes crucial for maintaining nutrition for plants.
Figure 15. Flowchart of total dissolved solids, illustrating the total dissolved solids control in this flowchart and detailing the sequential processes crucial for maintaining nutrition for plants.
Electronics 13 00820 g015
Figure 16. Flowchart turbidity control, illustrating the turbidity control in this flowchart and detailing the sequential processes crucial for maintaining water clarity.
Figure 16. Flowchart turbidity control, illustrating the turbidity control in this flowchart and detailing the sequential processes crucial for maintaining water clarity.
Electronics 13 00820 g016
Figure 17. Prototype evaluation: pivotal moment during the evaluation phase of prototype, showcasing the integration of testing process.
Figure 17. Prototype evaluation: pivotal moment during the evaluation phase of prototype, showcasing the integration of testing process.
Electronics 13 00820 g017
Figure 18. Step response of the water level of vegetable tank.
Figure 18. Step response of the water level of vegetable tank.
Electronics 13 00820 g018
Figure 19. Step response of the water level of fish tank.
Figure 19. Step response of the water level of fish tank.
Electronics 13 00820 g019
Figure 20. Response of the water heater tank.
Figure 20. Response of the water heater tank.
Electronics 13 00820 g020
Table 1. Specification tool requirements [14,15,20,31].
Table 1. Specification tool requirements [14,15,20,31].
NoType of SensorIndicatorSpecification
1pH sensorCatfish6–9 pH
Water spinach5.5–6.5 pH
2Temperature sensorCatfish25 °C–30 °C
Water spinach25 °C–30 °C
3Ultrasonic sensorRange distance0–30 cm
4Turbidity sensorRange measurement0–50 NTU
5TDS sensorPPM range800–1000 PPM
Table 2. Tank Level Parameters.
Table 2. Tank Level Parameters.
ParametersValueUnits
Area of tank1757.5 c m 2
Height of fish tank26 c m
Flow rate200L/H
Resistance0.472 s / c m 2
Table 3. More Tank Level Parameters.
Table 3. More Tank Level Parameters.
ParametersValueUnits
Area of tank1757.5 c m 2
Height of fish tank26 c m
Flow rate55.55 c m 3 / s
Density of water1 g / c m 2
Max power of electrical equipment50W
Table 4. Testing performed with obtained PID values for the vegetable tank.
Table 4. Testing performed with obtained PID values for the vegetable tank.
Vegetable TankPIDTimes
14700150 s (overdamped)
2471.5060 s (overshoot)
3471.5174200 s (overshoot @ 100 s)
Table 5. Testing performed with obtained PID values for the fish tank.
Table 5. Testing performed with obtained PID values for the fish tank.
Fish Tank PIDTimes
2200060 s (underdamped)
32010300 s (overshoot @140 s)
4300.5174250 s (critically damped)
Table 6. Testing performed with obtained PID values for the water heater.
Table 6. Testing performed with obtained PID values for the water heater.
HeaterPIDTimes
1100070 s (underdamped)
2101.50130 s (overshoot @ 40 s)
34.70.0431.88350 s (critically damped)
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Kok, C.L.; Kusuma, I.M.B.P.; Koh, Y.Y.; Tang, H.; Lim, A.B. Smart Aquaponics: An Automated Water Quality Management System for Sustainable Urban Agriculture. Electronics 2024, 13, 820. https://doi.org/10.3390/electronics13050820

AMA Style

Kok CL, Kusuma IMBP, Koh YY, Tang H, Lim AB. Smart Aquaponics: An Automated Water Quality Management System for Sustainable Urban Agriculture. Electronics. 2024; 13(5):820. https://doi.org/10.3390/electronics13050820

Chicago/Turabian Style

Kok, Chiang Liang, I Made Bagus Pradnya Kusuma, Yit Yan Koh, Howard Tang, and Ah Boon Lim. 2024. "Smart Aquaponics: An Automated Water Quality Management System for Sustainable Urban Agriculture" Electronics 13, no. 5: 820. https://doi.org/10.3390/electronics13050820

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