Chapter 3
Chapter 3
Artificial Neural Networks( ANNs) are flexible computational structures inspired by the mortal
brain, able to model any process or system handed they're trained with enough data obtained
from experience. The drying kinetics of the watermelon rind is particularly suited to be modeled
by ANNs due to its nonlinear characteristic. The network does n't have unequivocal knowledge
of the process governing equations but it can understand the underpinning sense of the data given
by experience in the training stage. This methodology allows enforcing a complex model with
multiple inputs and labors with a low number of laboratory trials and computational cost. Such a
model can also be used for vaccination. In addition, no validated theoretical, semi-theoretical, or
empirical models are demanded. The neural network is validated with a separate subset of the
training sets used in the reverse- propagation algorithm( training stage, confirmation stage, and
testing stage), and all the training sets are attained from the laboratory trials.
1
3.2 Implementation of ANN in Solar Drying Process
The primary objective of using an Artificial Neural Network (ANN) model in the prediction of
solar drying time with a solar dryer is to optimize the drying process by accurately forecasting
the time required for moisture removal under varying conditions. Solar drying is an energy-
efficient and environmentally friendly method used to preserve agricultural products, food items,
and other materials. However, the efficiency of the process depends on multiple variables such as
solar radiation, temperature, humidity, airflow, and the characteristics of the material being
dried. These factors often exhibit non-linear interdependencies, making traditional prediction
methods less effective. ANN, with its ability to model complex and non-linear relationships,
emerges as an ideal tool to improve the precision and efficiency of solar drying.
An ANN model for solar drying time prediction begins with data collection. Key parameters
influencing the drying process, such as ambient temperature, relative humidity, solar radiation
intensity, drying air velocity, and initial moisture content, are measured and recorded. This
dataset is then used to train the ANN model. The network typically consists of an input layer,
representing the variables; one or more hidden layers, responsible for learning the underlying
patterns; and an output layer, which predicts the drying time. The training process involves
feeding the input data into the network and adjusting the weights and biases using algorithms
such as backpropagation, coupled with optimization techniques like gradient descent. The model
iteratively minimizes the error between the predicted drying time and the actual values in the
dataset, refining its predictions over time. Once trained, the ANN model is tested with new,
unseen data to evaluate its accuracy and generalization capabilities.
The first step in the solar drying process is data acquisition, where parameters of interest are
evaluated. These usually comprise the exposure of the drying area to solar radiation, the
temperature, humidity and wind speed in the region as well as the temperature, speed of air in the
drying chamber and initial and final content of moisture in the dried material. In order for the
data sets to be effective, they are captured under a variety of operating conditions in order to
cover the diversity of the solar drying process.
As an intermediate step, the data goes through preprocessing, which is of utmost importance to
ready the data for the model. Preprocessing involves handling missing values and inconsistencies
in the data, preparing all input variables on a comparable scale by normalization, and augmenting
data if necessary. Normalizing is especially important in not allowing high magnitude features to
dominate during training of the model. The data set is further subdivided into three subsets:
training, validation, and test sets. The training set is used for actual modeling of ANN, whereas
2
the validation set helps in the tuning of hyperparameters and detecting overfitting. Test data are
kept aside for evaluating how well the model performs on new and unseen data.
The next phase is the modeling of the design and architecture of the ANN. This usually involves
an input layer corresponding to the number of features in the dataset, one or more hidden layers
to capture relationships between input variables and outputs in a non-linear fashion, and an
output layer representing the target variable (e.g., moisture content or drying rate). The number
of neurons in each hidden layer, along with their activation functions and optimization
algorithms, is dependent on how complex the solar drying process is and dataset characteristics.
For example, ReLU (Rectified Linear Unit) is an activation used for the hidden layers of the
network when solving linear regression problems.
In the training phase, the ANN model uses supervised learning. It uses a backpropagation
algorithm to minimize the error between the predicted and actual values of the target variable.
This is done by adjusting the weights and biases of the network through iterative updates based
on a loss function, for example Mean Squared Error (MSE). The optimization is to continue
using methods such as stochastic gradient descent or Adam optimizer until the error converges to
an acceptable level or a predefined number of epochs.
After training, the last steps are validating and testing. Validation is to finalize hyperparameters
such as learning rate, number of neurons in the hidden layer, and regularization techniques, to
achieve proper generalization capabilities for the model when it faces new data. A final
evaluation on the test dataset will provide a measure of performance in terms of predictive
accuracy, usually reported via such performance metrics as R² (coefficient of determination),
root mean squared error, or mean absolute error. In the end, the trained ANN model is taken into
reality. In the case of solar drying, it is then set to serve as a predictive tool for estimating drying
time or moisture content under different environmental and operational conditions. This would
enable responsive optimization controls on the drying process, such as varying air flow rates or
chamber temperatures in a more efficient way to obtain desired results. The model can still be
continuously calibrated and retrained to ensure its dynamic accuracy under shifting operating
conditions.
The outlined configuration brings the ANN model to an added level of rigor, reliability, and
effectiveness in supporting optimization and automation of the solar drying operation.
Data collection and preparation are important steps in building an effective artificial neural
network (ANN) because the quality of the data directly affects the performance of the model.
The process begins with collecting useful information from various sources such as sensors,
databases, or user input. Once the data is collected, it must be cleaned to remove missing values,
duplicates, inconsistencies, and outliers to ensure its accuracy and reliability. Feature engineering
3
then transforms the raw data into meaningful features; this may involve numerical evaluation of
values (normalization or denormalization), encoding categorical variables (e.g., single-bit
encoding), or creating new features based on expertise. The dataset is divided into training,
validation, and testing to evaluate the performance of the model and ensure that it performs well
on unseen data. Preparing the necessary information is important because inaccurate information
can lead to competitive, negative, or incorrect predictions and ultimately impact the outcomes of
AI power in real-world applications.
The data required by the ANN model consists of change in temperature of air , Heat generation
of air in solar dryer and air pressure drop are calculated by following formulas respectively:
Raw data collected from sensors measuring temperature and pressure differences is the
foundation for training an Artificial Neural Network (ANN) for solar drying. The first step is
cleaning the data to address missing values, outliers, and inconsistencies. For continuous features
like temperature and pressure differences, normalization or standardization is applied, scaling the
data to a consistent range, such as between 0 and 1 or to have a mean of 0 and standard deviation
of 1. This step ensures that the ANN isn't influenced by the varying scales of different input
features. If there are categorical variables, such as time of day or weather conditions, they are
transformed using one-hot encoding. After preprocessing, the data is split into training,
validation, and test sets to ensure the model generalizes to new, unseen data. This measure
improves the neural network’s ability to more accurately predict sun drying.
Hot Encoding is a method of converting categorical variables to binary format. It creates a new
binary string (0 and 1) for each group in the original variable. Each category in the first column
is represented as a separate column, where a value of 1 indicates that the category is present, and
a value of 0 indicates that it is not.
4
Designing an artificial neural network (ANN) model to predict a solar dryer involves several key
steps to ensure the network can learn and generalize from materials such as temperature, airflow,
and humidity. The flowsheet for it is as following:
Preprocessing (Normalization/Standardization)
┌────────────────┐
│ Input Layer ← 3 Neurons: Temperature, Airflow,
Humidity
└────────────────┘
↓
┌────────────────┐
│ Hidden Layer 1 ← 10-30 Neurons, Activation: ReLU
└────────────────┘
↓
┌────────────────┐
│ Hidden Layer 2 ← 10-20 Neurons (Optional), Activation:
ReLU
└────────────────┘
↓
┌────────────────┐
│ Output Layer ← 1 Neuron: Predicted Drying Time
(Continuous)
└────────────────┘
↓
5
Predictions: Drying Time
3.3.4 Deployment & Integration
Deploying and integrating an Artificial Neural Network (ANN) model to predict drying time in a
solar drying system requires a series of critical steps to ensure efficient and smooth operation.
Initially, the trained ANN model must be saved and converted into a deployable format, such as
TensorFlow SavedModel, HDF5, or ONNX, depending on the framework used (e.g.,
TensorFlow, Keras, PyTorch). Along with the model, necessary dependencies such as libraries
and data preprocessing functions should be packaged for compatibility in the production
environment.
The next step is selecting the appropriate deployment environment based on the system's
requirements. For systems with limited computational resources, edge devices like Raspberry Pi
or NVIDIA Jetson can be used. For scenarios requiring real-time predictions from multiple solar
dryers, cloud platforms like AWS SageMaker, Google AI Platform, or Microsoft Azure ML are
ideal. Alternatively, local servers can handle model inference if the processing capacity is
available.
Once deployed, the model must be integrated with sensors that monitor temperature, airflow, and
humidity in the solar drying system. Real-time sensor data is collected, preprocessed (e.g.,
normalized or standardized), and passed to the ANN for drying time predictions. Depending on
the setup, this processing can be done either locally on edge devices or in the cloud.
For broader integration, the model's prediction functionality can be exposed via a REST API,
using frameworks like Flask or FastAPI. This enables other systems or IoT devices to send input
data and receive predictions.
To ensure ongoing accuracy, continuous monitoring and maintenance are necessary. Tools like
Grafana and Prometheus can be used to monitor model performance, while retraining with new
data allows the model to adapt to changing conditions. A feedback loop helps improve the model
over time, ensuring optimal predictions.
By following these steps, the ANN model can be effectively deployed and integrated, providing
accurate, real-time predictions for drying time in solar drying systems.