%Version 3.1 December 2024
% See section 11 of the User Manual for version history
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                 %%
%% Please do not use \input{...} to include other tex files.       %%
%% Submit your LaTeX manuscript as one .tex document.              %%
%%                                                                 %%
%% All additional figures and files should be attached             %%
%% separately and not embedded in the \TeX\ document itself.       %%
%%                                                                 %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%\documentclass[referee,sn-basic]{sn-jnl}% referee option is meant for double line spacing

%%=======================================================%%
%% to print line numbers in the margin use lineno option %%
%%=======================================================%%

%%\documentclass[lineno,pdflatex,sn-basic]{sn-jnl}% Basic Springer Nature Reference Style/Chemistry Reference Style

%%=========================================================================================%%
%% the documentclass is set to pdflatex as default. You can delete it if not appropriate.  %%
%%=========================================================================================%%

%%\documentclass[sn-basic]{sn-jnl}% Basic Springer Nature Reference Style/Chemistry Reference Style

%%Note: the following reference styles support Namedate and Numbered referencing. By default the style follows the most common style. To switch between the options you can add or remove Numbered in the optional parenthesis. 
%%The option is available for: sn-basic.bst, sn-chicago.bst%  
 
%%\documentclass[pdflatex,sn-nature]{sn-jnl}% Style for submissions to Nature Portfolio journals
%%\documentclass[pdflatex,sn-basic]{sn-jnl}% Basic Springer Nature Reference Style/Chemistry Reference Style
\documentclass[pdflatex,sn-mathphys-num]{sn-jnl}% Math and Physical Sciences Numbered Reference Style
%%\documentclass[pdflatex,sn-mathphys-ay]{sn-jnl}% Math and Physical Sciences Author Year Reference Style
%%\documentclass[pdflatex,sn-aps]{sn-jnl}% American Physical Society (APS) Reference Style
%%\documentclass[pdflatex,sn-vancouver-num]{sn-jnl}% Vancouver Numbered Reference Style
%%\documentclass[pdflatex,sn-vancouver-ay]{sn-jnl}% Vancouver Author Year Reference Style
%%\documentclass[pdflatex,sn-apa]{sn-jnl}% APA Reference Style
%%\documentclass[pdflatex,sn-chicago]{sn-jnl}% Chicago-based Humanities Reference Style

%%%% Standard Packages
%%<additional latex packages if required can be included here>

\usepackage{graphicx}%
\usepackage{multirow}%
\usepackage{amsmath,amssymb,amsfonts}%
\usepackage{amsthm}%
\usepackage{mathrsfs}%
\usepackage[title]{appendix}%
\usepackage{xcolor}%
\usepackage{textcomp}%
\usepackage{manyfoot}%
\usepackage{makecell}%
\usepackage{adjustbox}%
\usepackage{subcaption}%
\usepackage{threeparttable}%
\usepackage{booktabs}%
\usepackage{algorithm}%
\usepackage{algorithmicx}%
\usepackage{algpseudocode}%
\usepackage{listings}%
%%%%

%%%%%=============================================================================%%%%
%%%%  Remarks: This template is provided to aid authors with the preparation
%%%%  of original research articles intended for submission to journals published 
%%%%  by Springer Nature. The guidance has been prepared in partnership with 
%%%%  production teams to conform to Springer Nature technical requirements. 
%%%%  Editorial and presentation requirements differ among journal portfolios and 
%%%%  research disciplines. You may find sections in this template are irrelevant 
%%%%  to your work and are empowered to omit any such section if allowed by the 
%%%%  journal you intend to submit to. The submission guidelines and policies 
%%%%  of the journal take precedence. A detailed User Manual is available in the 
%%%%  template package for technical guidance.
%%%%%=============================================================================%%%%

%% as per the requirement new theorem styles can be included as shown below
\theoremstyle{thmstyleone}%
\newtheorem{theorem}{Theorem}%  meant for continuous numbers
%%\newtheorem{theorem}{Theorem}[section]% meant for sectionwise numbers
%% optional argument [theorem] produces theorem numbering sequence instead of independent numbers for Proposition
\newtheorem{proposition}[theorem]{Proposition}% 
%%\newtheorem{proposition}{Proposition}% to get separate numbers for theorem and proposition etc.

\theoremstyle{thmstyletwo}%
\newtheorem{example}{Example}%
\newtheorem{remark}{Remark}%

\theoremstyle{thmstylethree}%
\newtheorem{definition}{Definition}%

\raggedbottom
%%\unnumbered% uncomment this for unnumbered level heads

\begin{document}

%%=============================================================%%
%% GivenName	-> \fnm{Joergen W.}
%% Particle	-> \spfx{van der} -> surname prefix
%% FamilyName	-> \sur{Ploeg}
%% Suffix	-> \sfx{IV}
%% \author*[1,2]{\fnm{Joergen W.} \spfx{van der} \sur{Ploeg} 
%%  \sfx{IV}}\email{iauthor@gmail.com}
%%=============================================================%%

\title[Article Title]{Design and Analysis of a Hexadic Tank System: Classical and Advanced Control Algorithms (Supplementary Material I)}

\author[1]{\fnm{Sagnik} \sur{Mitra}}\email{phd2001271007@iiti.ac.in}
\equalcont{These authors contributed equally to this work.}

\author*[1]{\fnm{Ganti Suryanarayana} \sur{Murthy}}\email{ganti.murthy@iiti.ac.in}
\equalcont{These authors contributed equally to this work.}

\affil[1]{\orgdiv{Mehta Family School of Biosciences and Biomedical Engineering }, \orgname{Indian Institute of Technology}, \orgaddress{\street{Khandwa Road}, \city{Indore}, \postcode{452020}, \state{Madhya Pradesh}, \country{India}}}

%%==================================%%
%% Sample for unstructured abstract %%
%%==================================%%

%\abstract{The abstract serves both as a general introduction to the topic and as a brief, non-technical summary of the main results and their implications. Authors are advised to check the author instructions for the journal they are submitting to for word limits and if structural elements like subheadings, citations, or equations are permitted.}

%%================================%%
%% Sample for structured abstract %%
%%================================%%

% \abstract{\textbf{Purpose:} The abstract serves both as a general introduction to the topic and as a brief, non-technical summary of the main results and their implications. The abstract must not include subheadings (unless expressly permitted in the journal's Instructions to Authors), equations or citations. As a guide the abstract should not exceed 200 words. Most journals do not set a hard limit however authors are advised to check the author instructions for the journal they are submitting to.
% 
% \textbf{Methods:} The abstract serves both as a general introduction to the topic and as a brief, non-technical summary of the main results and their implications. The abstract must not include subheadings (unless expressly permitted in the journal's Instructions to Authors), equations or citations. As a guide the abstract should not exceed 200 words. Most journals do not set a hard limit however authors are advised to check the author instructions for the journal they are submitting to.
% 
% \textbf{Results:} The abstract serves both as a general introduction to the topic and as a brief, non-technical summary of the main results and their implications. The abstract must not include subheadings (unless expressly permitted in the journal's Instructions to Authors), equations or citations. As a guide the abstract should not exceed 200 words. Most journals do not set a hard limit however authors are advised to check the author instructions for the journal they are submitting to.
% 
% \textbf{Conclusion:} The abstract serves both as a general introduction to the topic and as a brief, non-technical summary of the main results and their implications. The abstract must not include subheadings (unless expressly permitted in the journal's Instructions to Authors), equations or citations. As a guide the abstract should not exceed 200 words. Most journals do not set a hard limit however authors are advised to check the author instructions for the journal they are submitting to.}

%\keywords{keyword1, Keyword2, Keyword3, Keyword4}

%%\pacs[JEL Classification]{D8, H51}

%%\pacs[MSC Classification]{35A01, 65L10, 65L12, 65L20, 65L70}

\maketitle

\section {System Characterization} 

\subsection{Step Response Analysis}
Step response analysis characterizes the dynamic baseline behavior of the tank system under ideal conditions using a square-step input signal of 300 s duration. To evaluate robustness under realistic sensing conditions, structured and random measurement-level disturbances are superimposed onto the output signal (level measurements) while maintaining the step input signal, enabling evaluation of disturbance effects on perceived system response behavior.

\subsubsection{Nominal Step Response ($\text{SR}_\text{ND}$)}
Nominal step response analysis is fundamental to understand the pure dynamic behavior of a system. This test captures the idealized dynamic behavior of the system to a square-step input without any added disturbances.

$u(t) = \begin{cases}
1 & \text{if } 0 \leq t \leq 300 \\
0 & \text{if } 300 \leq t < \infty
\end{cases}
$

$x(t) = \text{measured tank levels at time t} $

\subsubsection{Step Response Under Disturbance ($\text{SR}_\text{D}$)}
Step response testing under disturbance conditions evaluates real-world system performance by quantifying robustness against external perturbations inherent in practical applications. This methodology examines how exogenous disturbances affect system response to square-step input by superimposing disturbance signals on output measurements (water-level sensors) while preserving fundamental step input characteristics and maintaining test validity within established step response theory.

Unlike conventional step-response analysis assuming disturbance-free conditions, this approach introduces realistic sensor-level perturbations comprising stochastic (random) and deterministic (sinusoidal) noise components. The sinusoidal component represents periodic measurement interference common in industrial systems. The step input signal remains unmodified throughout the test, ensuring adherence to classical step response methodologies while extending the analysis to evaluate robustness characteristics under practical operating conditions with measurement disturbances.

For a level measurement vector $x(t)$, the disturbed measurement becomes $x'(t) = x(t) + d(t)$, where $d(t)$ represents the disturbance function.

\emph{\textbf{Combined Disturbance: }}
Combined disturbance superimposes random white noise using Gaussian distribution and sinusoidal components (periodic interference) :
\begin{equation}
d(t) = \mathcal{N}(0, (\text{magnitude}/2)^2) + (\text{magnitude}/2) \sin(2\pi f t)
\end{equation}
Therefore, 
\begin{equation}
x'(t) = x(t) + \mathcal{N}(0, (\text{magnitude}/2)^2) + (\text{magnitude}/2) \sin(2\pi f t)
\end{equation}

The magnitudes have been varied from 0.15 cm to 2.00 cm (1\% - 13.33\%) from the chosen setpoint value of 15 cm with the magnitudes of the random component and the sinusoidal component divided equally with each subsequent variable magnitude. Step response analysis was restricted to disturbance magnitudes within 13.33\%, as larger deviations were deemed impractical for the experimental tank setup.

The generalized tank model for each tank $i$ is defined as:

\begin{align}
\frac{dh_i}{dt} = \frac{1}{A}(F_i - \alpha_i \sqrt{2gh_i}) \quad 
\end{align}

${\quad F_i \geq 0 \text{ or } h_i \geq }0$

where: 
\begin{itemize}
\item $\alpha_i \sqrt{2gh_i}$ = gravitational outflow
\end{itemize}

\begin{table}[h]
\caption{Abbreviations}\label{tab1}%
\begin{tabular}{@{}ll@{}}
\toprule
\textbf{Symbol} & \textbf{Description} \\
\midrule
$\text{SR}_\text{D}$       & Step Response with disturbance \\
$\text{SR}_\text{ND}$      & Step Response without disturbance \\
$\text{PID-AW}_\text{D}$   & PID AntiWindup Controller with disturbances \\
$\text{PID-AW}_\text{ND}$  & PID AntiWindup Controller without disturbances \\
$\text{PID-GS}_\text{D}$   & PID Gainscheduling Controller with disturbances \\
$\text{PID-GS}_\text{ND}$  & PID Gainscheduling Controller without disturbances \\
PAT                        & Process Analytical Technology \\
QbD                        & Quality by Design \\
\botrule
\end{tabular}
\end{table}


\begin{table}[h]
\caption{Notations}\label{tab2}%
\begin{tabular}{@{}ll@{}}
\toprule
\textbf{Notation} & \textbf{Description} \\
\midrule
$h_i$            & Height of tanks in tank $i$ \\
$ID$             & Internal diameter of tanks \\
$V$              & Voltage \\
$s$              & Time in seconds \\
$u(t)$           & Standard input signal function \\
$x(t)$           & Standard measured system response/output signal \\
$A$              & Tank cross-sectional area \\
$F_i$            & Input flow rate from input pump \\
$\alpha$         & Gravitational outflow coefficient \\
$\beta$          & Leakage flow coefficient \\
$g$              & Acceleration due to gravity \\
$\mathcal{N}$    & Gaussian (normal) distribution \\
$f$              & Frequency of sinusoidal component \\
$d(t)$           & Combined disturbance function at time $t$ \\
$e_i(t)$         & Error signal for tank $i$ \\
$h_{sp, i}$      & Setpoint for tank $i$ \\
$R_i$            & Relay state \\
$\delta_{upper}$ & Upper hysteresis threshold \\
$\delta_{lower}$ & Lower hysteresis threshold \\
$K_p$            & Proportional gain \\
$K_i$            & Integral gain \\
$K_d$            & Derivative gain \\
$d_i$            & Disturbance parameter for tanks $i$ \\
$\phi$           & Bidirectional flow coefficient \\
$\Delta$         & Inter-tank coupling flow coefficient \\
\botrule
\end{tabular}
\end{table}

\section{Classical Control Algorithms}

\subsection{PID Control Implementation with AntiWindup} 
The PID controller was selected as the control algorithm, reflecting its widespread use in industry (estimated at 90\% \citep{bib1}). The implemented control system features a PID controller with antiwindup mechanisms. The controller incorporates both internal and external disturbance handling, with particular attention to integral windup prevention and relay-based hysteresis control. The physical system was analysed with a sampling time of 10 s and a test duration of 300 s across all PID controllers used.The control logic is implemented as follows:

For each tank $i$, the error signal is defined as:
\begin{equation}
e_i(t) = h_i(t) - h_{sp,i}
\end{equation}

where $h_i(t)$ is the current water level and $h_{sp,i}$ is the set point for the tank $i$. The relay state $R_i$ is determined by the hysteresis control law:

\begin{equation}
R_i(t) = \begin{cases}
1 & \text{if } e_i(t) > \delta_{upper} \\
0 & \text{if } e_i(t) < \delta_{lower} \\
R_i(t^-) & \text{if } \delta_{lower} \leq e_i(t) \leq \delta_{upper}
\end{cases}
\end{equation}

where:
\begin{itemize}
    \item $\delta_{upper} = +0.5$ cm (upper hysteresis threshold)
    \item $\delta_{lower} = -0.5$ cm (lower hysteresis threshold)
    \item $R_i(t^-)$ represents the previous relay state
    \item $R_i = 1$ corresponds to relay OFF (pump OFF)
    \item $R_i = 0$ corresponds to relay ON (pump ON)
\end{itemize}

The hysteresis mechanism creates a dead band of width $\delta_{net} = \delta_{upper} - \delta_{lower} = 1.0$ cm around each setpoint. This dead band serves multiple purposes including chatter prevention, robust switching, disturbance rejection, and energy efficiency. The complete control algorithm integrates PID computation with hysteresis switching:

\begin{algorithm}
\caption{Relay-Based Hysteresis with PID Control}\label{algo1}
\begin{algorithmic}[1]
\For{each tank $i = 1$ to $6$}
    \State Compute PID output: $u_i = \text{PID}_i(h_{sp,i}, h_i)$
    \State Calculate error: $e_i = h_{sp,i} - h_i$
    \If{$e_i > \delta_{upper}$}
        \State $R_i \leftarrow 1$ \Comment{Turn OFF pump (relay open)}
    \ElsIf{$e_i < \delta_{lower}$}
        \State $R_i \leftarrow 0$ \Comment{Turn ON pump (relay closed)}
    \Else
        \State $R_i \leftarrow R_i(t^-)$ \Comment{Maintain previous relay state}
    \EndIf
\EndFor
\State Transmit relay states: $[R_1, R_2, \dots, R_6]$
\end{algorithmic}
\end{algorithm}

The hysteresis-based approach (PID-AW$_{\text{D}}$) provides superior performance under disturbance conditions by maintaining relay state memory within the dead band, thereby reducing unnecessary switching and improving system stability. The system employs tank-specific PID parameters as obtained from heuristics and has derived the gains from the tank configuration as given in Table 3.

\begin{table}[h]
\caption{PID AntiWindup Controller Gains per Tank}\label{tab1}%
\begin{tabular}{@{}lllllll@{}}
\toprule
\textbf{Tank} & \multicolumn{3}{c}{\textbf{$\text{PID-AW}_\text{ND}$}} & \multicolumn{3}{c}{\textbf{$\text{PID-AW}_\text{D}$}} \\
\cmidrule(lr){2-4} \cmidrule(lr){5-7}
 & \textbf{Kp} & \textbf{Ki} & \textbf{Kd} & \textbf{Kp} & \textbf{Ki} & \textbf{Kd} \\
\midrule
Tank 1 & 4.0 & 0.03  & 0.15 & 4.0 & 0.03  & 0.15 \\
Tank 2 & 6.0 & 0.05  & 0.10 & 6.0 & 0.05  & 0.10 \\
Tank 3 & 1.8 & 0.12  & 0.10 & 1.8 & 0.12  & 0.10 \\
Tank 4 & 1.5 & 0.005 & 1.50 & 1.5 & 0.005 & 1.50 \\
Tank 5 & 0.5 & 0.01  & 1.00 & 0.5 & 0.01  & 1.00 \\
Tank 6 & 2.7 & 0.01  & 0.10 & 2.7 & 0.01  & 0.10 \\
\botrule
\end{tabular}
\footnotetext{The gains for $\text{PID-AW}_\text{ND}$ and $\text{PID-AW}_\text{D}$ are identical across all tanks.}
\end{table}

The PID controller gains presented in Table 3 were selected to achieve robust and stable performance for each tank. These gains were optimised to handle both the transient response to setpoint changes and the effective rejection of unmeasured disturbances. As such, the same controller adjustment is applied to both the PID-AW$_{\text{D}}$ and PID-AW$_{\text{ND}}$ scenarios, highlighting that a properly tuned PID controller can maintain its effectiveness under various operating conditions. The role of the anti-windup mechanism was to ensure that actuator saturation, which can occur during both large setpoint changes and significant disturbances, does not lead to integral wind-up and subsequent performance degradation.

\subsection{PID Control Implementation with Gain-Scheduling} 
PID control with the gain scheduling strategy employs adaptive gains based on the current water level, ensuring optimal performance in different operating ranges \cite{bib2}. The gain scheduler divides the operating range into three regions: low region or low setpoint, mid region or mid setpoint, and high region or high setpoint. The rationale for using three ranges of setpoints in gain scheduling is based on the non-linear characteristics of the tank system, which could be inherent system non-linearities.  The three-region approach captures the essential non-linear behaviour of the tank system while maintaining practical simplicity. Each region addresses specific dynamic characteristics and control requirements, ensuring optimal performance throughout the operating range. The gain scheduling-based values $K_p$, $K_i$ and $K_d$ are also given in Table 4. 

\begin{table}[h]
\caption{PID Gain Scheduling Parameters for All Tanks}\label{tab1}%
\begin{tabular}{@{}llllllll@{}}
\toprule
\multirow{2}{*}{\textbf{Tank}} & \multirow{2}{*}{\textbf{Setpoint Range}} & \multicolumn{3}{c}{\textbf{PID-GS$_\text{ND}$}} & \multicolumn{3}{c}{\textbf{PID-GS$_\text{D}$}} \\
\cmidrule(lr){3-5} \cmidrule(lr){6-8}
& & \textbf{Kp} & \textbf{Ki} & \textbf{Kd} & \textbf{Kp} & \textbf{Ki} & \textbf{Kd} \\
\midrule
\multirow{3}{*}{Tank 1} & $<$ 10 cm        & 3.0 & 0.1  & 0.05 & 4.0 & 0.03  & 0.15 \\
                        & 10 cm to 20 cm   & 2.0 & 0.05 & 0.02 & 2.7 & 0.02  & 0.10 \\
                        & $\geq$ 20 cm     & 1.0 & 0.01 & 0.01 & 2.7 & 0.02  & 0.10 \\
\midrule
\multirow{3}{*}{Tank 2} & $<$ 10 cm        & 3.0 & 0.1  & 0.05 & 3.0 & 0.02  & 0.30 \\
                        & 10 cm to 20 cm   & 2.0 & 0.05 & 0.02 & 2.5 & 0.015 & 0.25 \\
                        & $\geq$ 20 cm     & 1.0 & 0.01 & 0.01 & 2.5 & 0.015 & 0.25 \\
\midrule
\multirow{3}{*}{Tank 3} & $<$ 10 cm        & 3.0 & 0.1  & 0.05 & 0.9 & 0.03  & 0.35 \\
                        & 10 cm to 20 cm   & 2.0 & 0.05 & 0.02 & 0.7 & 0.025 & 0.30 \\
                        & $\geq$ 20 cm     & 1.0 & 0.01 & 0.01 & 0.7 & 0.025 & 0.30 \\
\midrule
\multirow{3}{*}{Tank 4} & $<$ 10 cm        & 3.0 & 0.1  & 0.05 & 1.4 & 0.006 & 1.60 \\
                        & 10 cm to 20 cm   & 2.0 & 0.05 & 0.02 & 1.2 & 0.004 & 1.80 \\
                        & $\geq$ 20 cm     & 1.0 & 0.01 & 0.01 & 1.2 & 0.004 & 1.80 \\
\midrule
\multirow{3}{*}{Tank 5} & $<$ 10 cm        & 3.0 & 0.1  & 0.05 & 0.4 & 0.008 & 1.20 \\
                        & 10 cm to 20 cm   & 2.0 & 0.05 & 0.02 & 0.3 & 0.006 & 1.00 \\
                        & $\geq$ 20 cm     & 1.0 & 0.01 & 0.01 & 0.3 & 0.006 & 1.00 \\
\midrule
\multirow{3}{*}{Tank 6} & $<$ 10 cm        & 3.0 & 0.1  & 0.05 & 2.0 & 0.008 & 0.15 \\
                        & 10 cm to 20 cm   & 2.0 & 0.05 & 0.02 & 1.5 & 0.006 & 0.20 \\
                        & $\geq$ 20 cm     & 1.0 & 0.01 & 0.01 & 1.5 & 0.006 & 0.20 \\
\botrule
\end{tabular}
\end{table}



Table 4 shows how the gains of the PID controller (Kp, Ki, and Kd) are adjusted based on the setpoint range and the presence of disturbances. In the $\text{PID-GS}_\text{ND}$ case, as the setpoint increases, the tank's behavior becomes more integrating and non-linear, requiring smaller gains to prevent instability and overshoot. Specifically, the proportional gain (Kp) is reduced to decrease the controller's immediate reaction to the error, and the integral gain (Ki) is reduced to prevent integral windup. The derivative gain (Kd) is also reduced as the system is slower to react, making the derivative term less effective and potentially noisy. In the $\text{PID-GS}_\text{D}$ case, the gains are generally higher to ensure a faster and more robust response to external fluctuations, with the specific values fine-tuned for each tank's unique dynamics. For example, some tanks may require a higher Kd to dampen oscillations effectively, while others need a higher Kp to correct errors more aggressively.  This adaptive approach, where gains are scheduled based on the operating point, ensures that the controller can effectively manage the system's changing dynamics and maintain optimal performance across the entire operating envelope, unlike a single-gain PID controller which would be a compromise at best.

The test configuration parameters for both PID Antiwindup and PID Gainscheduling have been described in Table 5 along with Figure I and Figure II respectively as given below.

\begin{table}[h]
\caption{PID Controller Test Configuration Parameters}\label{tab1}%
\begin{tabular}{@{}lllll@{}}
\toprule
Parameter & \thead{PID-AW\\$_\text{ND}$} & \thead{PID-AW\\$_\text{D}$} & \thead{PID-GS\\$_\text{ND}$} & \thead{PID-GS\\$_\text{D}$}\\
\midrule
Control Method          & Direct Threshold              & Hysteresis Band                    & N/A                    & N/A \\
Switching Logic         & $h_i \gtrless h_{sp,i} \pm 1.0$ & $e_i \gtrless \pm 0.5$           & N/A                    & N/A \\
Dead Band               & None                          & 1.0 cm                             & N/A                    & N/A \\
State Memory            & No                            & Yes                                & N/A                    & N/A \\
Output Limit            & $\pm$5.0                      & $\pm$5.0                           & $\pm$5.0               & $\pm$5.0 \\
Integral Limit          & output\_limit/ki              & min(output\_limit/ki, 2.0)         & \thead[l]{Adaptive\\based on Ki} & Not specified \\
Disturbance Type        & N/A                           & \thead[l]{Combined\\(Random +\\Sinusoidal)}  & N/A     & \thead[l]{Combined\\(Random +\\Sinusoidal)} \\
Disturbance Magnitude   & N/A                           & \thead[l]{Varied from\\0.15--2.00 cm}        & N/A     & \thead[l]{Varied from\\0.15--2.00 cm} \\
Noise Std.\ Deviation   & N/A                           & 0.1 cm                             & N/A                    & N/A \\
Model Uncertainty       & N/A                           & 3\%                                & N/A                    & 3\% \\
Actuator Delay          & N/A                           & N/A                                & N/A                    & 50 ms \\
Sensor Bias             & N/A                           & N/A                                & N/A                    & 0.1 cm \\
Setpoint Tolerance      & 1.0 cm                        & 1.0 cm                             & 1.0 cm                 & 1.0 cm \\
\botrule
\end{tabular}
\footnotetext{The subscripts ND and D denote Non-Disturbed and Disturbed test conditions, respectively.}
\footnotetext[1]{PID-AW refers to PID with Anti-Windup; PID-GS refers to PID with Gain Scheduling.}
\footnotetext[2]{Disturbance magnitude was varied across test scenarios to evaluate controller robustness.}
\end{table}

\begin{figure}[htbp]
\centering
\begin{subfigure}[b]{0.48\textwidth}
    \centering
    \includegraphics[width=\textwidth]{PID_AW_TANK1.png}
    \caption{}
    \label{fig:tank1}
\end{subfigure}%
\hfill
\begin{subfigure}[b]{0.48\textwidth}
    \centering
    \includegraphics[width=\textwidth]{PID_AW_TANK2.png}
    \caption{}
    \label{fig:tank2}
\end{subfigure}

\vspace{0.5em}

\begin{subfigure}[b]{0.48\textwidth}
    \centering
    \includegraphics[width=\textwidth]{PID_AW_TANK3.png}
    \caption{}
    \label{fig:tank3}
\end{subfigure}%
\hfill
\begin{subfigure}[b]{0.48\textwidth}
    \centering
    \includegraphics[width=\textwidth]{PID_AW_TANK4.png}
    \caption{}
    \label{fig:tank4}
\end{subfigure}

\vspace{0.5em}

\begin{subfigure}[b]{0.48\textwidth}
    \centering
    \includegraphics[width=\textwidth]{PID_AW_TANK5.png}
    \caption{}
    \label{fig:tank5}
\end{subfigure}%
\hfill
\begin{subfigure}[b]{0.48\textwidth}
    \centering
    \includegraphics[width=\textwidth]{PID_AW_TANK6.png}
    \caption{}
    \label{fig:tank6}
\end{subfigure}
\caption{Comparison of $\text{PID-AW}_\text{ND}$ and $\text{PID-AW}_\text{D}$ performance for all six tanks of the physical system -(a) Tank 1, (b) Tank 2, (c) Tank 3, (d) Tank 4, (e) Tank 5, (f) Tank 6}
\label{fig:all_tanks}
\end{figure}

\begin{figure}[htbp]
\centering
\begin{subfigure}[b]{0.48\textwidth}
    \centering
    \includegraphics[width=\textwidth]{PID_GS_TANK1.png}
    \caption{}
    \label{fig:tank1gs}
\end{subfigure}%
\hfill
\begin{subfigure}[b]{0.48\textwidth}
    \centering
    \includegraphics[width=\textwidth]{PID_GS_TANK2.png}
    \caption{}
    \label{fig:tank2gs}
\end{subfigure}

\vspace{0.5em}

\begin{subfigure}[b]{0.48\textwidth}
    \centering
    \includegraphics[width=\textwidth]{PID_GS_TANK3.png}
    \caption{}
    \label{fig:tank3gs}
\end{subfigure}%
\hfill
\begin{subfigure}[b]{0.48\textwidth}
    \centering
    \includegraphics[width=\textwidth]{PID_GS_TANK4.png}
    \caption{}
    \label{fig:tank4gs}
\end{subfigure}

\vspace{0.5em}

\begin{subfigure}[b]{0.48\textwidth}
    \centering
    \includegraphics[width=\textwidth]{PID_GS_TANK5.png}
    \caption{}
    \label{fig:tank5gs}
\end{subfigure}%
\hfill
\begin{subfigure}[b]{0.48\textwidth}
    \centering
    \includegraphics[width=\textwidth]{PID_GS_TANK6.png}
    \caption{}
    \label{fig:tank6gs}
\end{subfigure}
\caption{Comparison of $\text{PID-GS}_\text{ND}$ and $\text{PID-GS}_\text{D}$ performance for all six tanks of the physical system - (a) Tank 1, (b) Tank 2, (c) Tank 3, (d) Tank 4, (e) Tank 5, (f) Tank 6}
\label{fig:all_tanks_gs}
\end{figure}

\section{System Analysis and Comparison}
A time domain metrics table for all controllers is shown in Table 7, and the simulations are shown in Table 8.  

\subsection{Step Response Analysis}
The step response analysis has been shown separately with the idea that it is the first testing schema on which the controllers have been designed. The responses of the physical system have been provided with and without disturbances in Table 6. 

\begin{table}[h]
\caption{Step Response of Physical System and Simulation Model Time Domain Metrics}\label{tab1}%
\begin{tabular}{@{}lllll@{}}
\toprule
\textbf{Metric} & \multicolumn{2}{c}{\textbf{SR$_\text{D}$}} & \multicolumn{2}{c}{\textbf{SR$_\text{ND}$}} \\
 & \textbf{Physical System} & \textbf{Simulation Model} & \textbf{Physical System} & \textbf{Simulation Model} \\
\midrule
Time Constant (s)  & 3.00 - 7.01  & 1.50 - 6.78  & 2.00 - 17.03 & 2.16 - 19.7  \\
Rise time (s)      & 11.02 - 25.05 & 13.44 - 35.71 & 13.02 - 27.04 & 1.04 - 29.3  \\
Peak time (s)      & 7.01 - 28.05 & 9.76 - 29.96 & 6.01 - 29.05 & 8.7 - 30.02  \\
Settling time (s)  & 8.01 - 16.02 & 2.34 - 17.65 & 9.01 - 26.04 & 10.2 - 25.3  \\
Overshoot (\%)     & 63.57 - 86.84 & 70.9 - 89.98 & 11.86 - 84.46 & 60.2 - 78.90 \\
Steady State Error & 0            & 0            & 0            & 0             \\
Decay Ratio        & 0.08 - 1.06  & 1.07 - 1.15  & 0.21 - 1.00  & 1.3 - 1.44   \\
Response time (s)  & 3.00 - 16.03 & 4.01 - 17.96 & 2.00 - 20.03 & 0.1 - 12.9   \\
Frequency (Hz)     & 0.12 - 0.40  & 0.38 - 0.58  & 0.12 - 0.60  & 0.02 - 0.04  \\
Damping Ratio      & -0.61 - 0.14 & -0.91 - 0.74 & -0.43 - 0.56 & -0.63 - 0.96 \\
System Gain        & 0.01 - 1.18  & 0.02 - 1.05  & 0.02 - 4.89  & 0.002 - 0.034 \\
\botrule
\end{tabular}
\end{table}


\subsection{Time Domain Performance Analysis}
In the physical system, all controllers exhibit very long time constants, rise times, and settling times, often in the range of hundreds of seconds, indicating a slow and sluggish response. This is particularly evident in the $\text{PID-AW}_\text{ND}$ controller, which has a rise time range of 149-308s and a settling time range of 168-315s.  Furthermore, controllers show a wide range of variability in their performance metrics. $\text{PID-AW}_\text{D}$ has a rise time range of 7-383s, highlighting a lack of predictability and robustness. The significant differences in response times between the controllers in the physical system (e.g., $\text{PID-AW}_\text{D}$ with a range of 105-357s versus $\text{PID-GS}_\text{ND}$ with a range of 122-296s) suggest that the presence of real-world disturbances and non-linearities has a major impact, making the system's behavior less consistent and slower.  Despite this, all controllers achieve a zero steady-state error, which indicates their ability to eventually reach the desired setpoint, although slowly.

\begin{table}[h]
\caption{Controller Performance Metrics for Physical System}\label{tab1}%
\scriptsize
\begin{tabular}{@{}lllllllll@{}}
\toprule
\textbf{Controller} & \textbf{$\tau$ (s)} & \textbf{$t_r$ (s)} & \textbf{$t_p$ (s)} & \textbf{$t_s$ (s)} & \textbf{OS \%} & \textbf{SSE} & \textbf{DR} & \textbf{$t_{res}$ (s)} \\
\midrule
$\text{PID-AW}_\text{D}$   & 102 - 356 & 7.48 - 383 & 39 - 302.79 & 102 - 383 & $-20$ - 59 & 0 & 1.00 - 1.24 & 105 - 357 \\
$\text{PID-AW}_\text{ND}$  & 95 - 253  & 149 - 308  & 162 - 311   & 168 - 315 & 0 - 0      & 0 & 1.01 - 1.13 & 162 - 311 \\
$\text{PID-GS}_\text{D}$   & 101 - 323 & 9 - 390    & 37 - 298    & 98 - 379  & 20 - 59    & 0 & 1.00 - 1.07 & 100 - 350 \\
$\text{PID-GS}_\text{ND}$  & 2 - 243   & 2 - 281    & 119 - 288   & 121 - 295 & 0 - 6.83   & 0 & 1.00 - 1.18 & 122 - 296 \\
\botrule
\end{tabular}
\footnotetext{$\tau$: Time Constant, $t_r$: Rise Time, $t_p$: Peak Time, $t_s$: Settling Time, OS: Overshoot, SSE: Steady State Error, DR: Decay Ratio, $t_{res}$: Response Time.}
\end{table}

The significant difference between the wide performance ranges of the physical system and the tighter ranges of the simulation underscores a key point: simulation is valuable for initial design and comparison, but real-world testing is essential to account for all practical factors. The greater variability and generally slower responses observed in the physical system data, particularly for gain-scheduling controllers, highlight the challenges of real-world implementation.

\section {Conclusion}
For the physical system, the $\text{PID-GS}_\text{ND}$ controller shows the most balanced and efficient performance. Its rise time and response time ranges are the tightest and among the fastest, indicating a more predictable and quicker response. Although the other controllers have some overlapping metrics, $\text{PID-GS}_\text{ND}$  provides the best combination of speed and stability. For example, its settling time range is 121-295s, which is a significant improvement over the 168-315s range of the $\text{PID-AW}_\text{ND}$  and is more consistent than the wide range of the $\text{PID-AW}_\text{D}$  (102-383s). Crucially, the $\text{PID-GS}_\text{ND}$  controller shows a low overshoot percentage (0-6.83\%), suggesting a well-damped response with minimal oscillation, making it the most stable choice for physical setup.

While the $\text{PID-GS}_\text{ND}$ controller demonstrates superior performance in both physical and simulated environments, the persistent challenges of overshoot, settling time variability, and sensitivity to unmodeled dynamics underscore the limitations of conventional PID approaches. These findings highlight the critical need for advanced process controllers—such as model predictive control (MPC), adaptive control, or intelligent optimization-based strategies—that can better handle system uncertainties, nonlinearities, and disturbances. Such advanced controllers would enable tighter regulation, improved robustness, and enhanced performance consistency across diverse operating conditions, ultimately pushing the boundaries of process control effectiveness beyond what traditional PID structures can achieve.

\section{Declarations}
The authors share no conflict of interest and all the data provided are original to the best of our knowledge. 

\section{Funding Declaration}
The authors would like to thank the Indian Institute of Technology, Indore and the Ministry of Education for the research support provided. 

\begin{thebibliography}{13}
% BibTex style file: bmc-mathphys.bst (version 2.1), 2014-07-24
\ifx \bisbn   \undefined \def \bisbn  #1{ISBN #1}\fi
\ifx \binits  \undefined \def \binits#1{#1}\fi
\ifx \bauthor  \undefined \def \bauthor#1{#1}\fi
\ifx \batitle  \undefined \def \batitle#1{#1}\fi
\ifx \bjtitle  \undefined \def \bjtitle#1{#1}\fi
\ifx \bvolume  \undefined \def \bvolume#1{\textbf{#1}}\fi
\ifx \byear  \undefined \def \byear#1{#1}\fi
\ifx \bissue  \undefined \def \bissue#1{#1}\fi
\ifx \bfpage  \undefined \def \bfpage#1{#1}\fi
\ifx \blpage  \undefined \def \blpage #1{#1}\fi
\ifx \burl  \undefined \def \burl#1{\textsf{#1}}\fi
\ifx \doiurl  \undefined \def \doiurl#1{\url{https://doi.org/#1}}\fi
\ifx \betal  \undefined \def \betal{\textit{et al.}}\fi
\ifx \binstitute  \undefined \def \binstitute#1{#1}\fi
\ifx \binstitutionaled  \undefined \def \binstitutionaled#1{#1}\fi
\ifx \bctitle  \undefined \def \bctitle#1{#1}\fi
\ifx \beditor  \undefined \def \beditor#1{#1}\fi
\ifx \bpublisher  \undefined \def \bpublisher#1{#1}\fi
\ifx \bbtitle  \undefined \def \bbtitle#1{#1}\fi
\ifx \bedition  \undefined \def \bedition#1{#1}\fi
\ifx \bseriesno  \undefined \def \bseriesno#1{#1}\fi
\ifx \blocation  \undefined \def \blocation#1{#1}\fi
\ifx \bsertitle  \undefined \def \bsertitle#1{#1}\fi
\ifx \bsnm \undefined \def \bsnm#1{#1}\fi
\ifx \bsuffix \undefined \def \bsuffix#1{#1}\fi
\ifx \bparticle \undefined \def \bparticle#1{#1}\fi
\ifx \barticle \undefined \def \barticle#1{#1}\fi
\bibcommenthead
\ifx \bconfdate \undefined \def \bconfdate #1{#1}\fi
\ifx \botherref \undefined \def \botherref #1{#1}\fi
\ifx \url \undefined \def \url#1{\textsf{#1}}\fi
\ifx \bchapter \undefined \def \bchapter#1{#1}\fi
\ifx \bbook \undefined \def \bbook#1{#1}\fi
\ifx \bcomment \undefined \def \bcomment#1{#1}\fi
\ifx \oauthor \undefined \def \oauthor#1{#1}\fi
\ifx \citeauthoryear \undefined \def \citeauthoryear#1{#1}\fi
\ifx \endbibitem  \undefined \def \endbibitem {}\fi
\ifx \bconflocation  \undefined \def \bconflocation#1{#1}\fi
\ifx \arxivurl  \undefined \def \arxivurl#1{\textsf{#1}}\fi
\csname PreBibitemsHook\endcsname

%%% 14
\bibitem[\protect\citeauthoryear{Rao et~al.}{2020}]{bib1}
\begin{botherref}
\oauthor{\bsnm{Rao}, \binits{C.V.N.}},
\oauthor{\bsnm{Murty}, \binits{M.S.N.}},
\oauthor{\bsnm{Potnuru}, \binits{D.}}:
Control of four tank system using Grasshopper Algorithm.
In: 2020 IEEE India Council International Subsections Conference (INDISCON),
pp. \bfpage{200}--\blpage{203}.
IEEE
(2020)
\end{botherref}
\endbibitem

%%% 15
\bibitem[\protect\citeauthoryear{Abdullah and Zribi}{2012}]{bib2}
\begin{barticle}
\bauthor{\bsnm{Abdullah}, \binits{A.}},
\bauthor{\bsnm{Zribi}, \binits{M.}}:
\batitle{Control schemes for a quadruple tank process}.
\bjtitle{International Journal of Computers Communications \& Control}
\bvolume{7}(\bissue{4}),
\bfpage{594}--\blpage{605}
(\byear{2012})
\end{barticle}
\endbibitem

\end{thebibliography}

\end{document}
