
% Redigert igjen av Sigurd Skogestad, mai 2018


\documentclass[b5paper,article, medievalpage, twopage]{memoir}



%\raggedyright
\raggedright
\parindent1.5em


% memoir stuff

% writing help
\usepackage{todonotes}

\usepackage{acronym}

\usepackage[mode=image]{standalone}

% tables
\usepackage{booktabs}
\usepackage{ctable}
\usepackage{multirow}
\usepackage{array}


% math
\usepackage{amsmath, amsthm}
\usepackage{commath}
\usepackage{nicefrac}
%\usepackage{xfrac}

% bibliography
\usepackage[round]{natbib}         % required for bibliography
%\setcitestyle{authoryear}

%\RequirePackage{textcomp}
\RequirePackage{ragged2e}
\RequirePackage[osf,sc]{mathpazo}
\RequirePackage[T1]{fontenc}

%\usepackage[fulloldstylenums]{kpfonts}
%\usepackage[cmintegrals,cmbraces]{newtxmath}
%\usepackage{ebgaramond-maths}
%\RequirePackage{tgpagella}
% \RequirePackage{newpxtext,newpxmath}
% \useosf
\RequirePackage[scaled=0.90]{helvet}
\RequirePackage[scaled=0.85]{beramono}



\usepackage[perpage,para,symbol*]{footmisc}


% figures
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\usepgfplotslibrary{groupplots}
%\usepgfplotslibrary{colorbrewer}
%\usepgfplotslibrary{rangedframe}


\usetikzlibrary{colorbrewer}
%\colorlet{colorPI}{Set1-5-2}
% \colorlet{colorPID}{Set1-5-3}
% \colorlet{colorHaugen}{Set1-5-4}
% \colorlet{colorPIDpar}{Set1-5-4}
% \colorlet{colorIoSIMC}{Set1-8-5}
% \colorlet{colorZN}{Set1-5-1}
% \colorlet{colorisimc}{Set1-5-4}
%\newlength{\downshift}
%\newlength{\leftshift}

\usepackage{xstring}

\newcommand{\includewithpath}[2][]{%
    \begingroup%
    \StrCount{#2}{/}[\matches]%
    \StrBefore[\matches]{#2}{/}[\datapath]%
    \includestandalone[#1]{#2}%
    \endgroup%
}
\pgfplotsset{every axis plot post/.append style={line width = 1.3pt}}
% typesetting
\usepackage{microtype}
\usepackage{mdwlist}
%\usepackage{parskip}
%\usepackage{pseudocode}
%\usepackage[T1]{fontenc}
\usepackage[per-mode = symbol]{siunitx} %[per-mode =fraction] symbor
\usepackage{framed}

%\usepackage{mathpazo} % math & rm
%\linespread{1.05}        % Palatino needs more leading (space between lines)
%\usepackage[scaled]{helvet} % ss
%\usepackage{courier} % tt
%\usepackage[T1]{fontenc}
%\usepackage{mtpro2}
%\raggedright

% \pgfplotsset{compat=newest}
% \pgfplotsset{plot coordinates/math parser=false}
% \usetikzlibrary{plotmarks, matrix, calc, chains}



% % New definition of square root:

% old sqrt
\let\oldsqrt\sqrt

% Improved sqrt
\def\sqrt{\mathpalette\DHLhksqrt}
\def\DHLhksqrt#1#2{%
\setbox0=\hbox{$#1\oldsqrt{#2\,}$}\dimen0=\ht0
\advance\dimen0-0.2\ht0
\setbox2=\hbox{\vrule height\ht0 depth -\dimen0}%
{\box0\lower0.4pt\box2}}
\providecommand{\renewoperator}[3]{%
  \renewcommand*{#1}{\mathop{#2}#3}}
% \renewoperator{\Re}{\mathrm{Re}}{\nolimits}



% \newtheorem{theorem}{Theorem}
% \newtheorem{lemma}{Lemma}
\usepackage[smallcaps]{glossaries}

% acronym def
\loadglsentries{glossary}

%\newglossaryentry{niae_dy}{name={\ensuremath{\gls{iae_dy}}/\gls{iae_dy_ref}}, description=normalized IAE for output disturbances}
%\newglossaryentry{niae_du}{name={\ensuremath{\gls{iae_du}}/\gls{iae_du_ref}}, description=normalized IAE for input disturbances}


\title{Optimal PI and PID Control of First-Order Plus Delay Processes and Evaluation of the Original and Improved SIMC Rules}
\author{Chriss Grimholt and Sigurd Skogestad}


\begin{document}
\glsunset{simc}
\glsunset{isimc}
\glsunset{i0simc}
\glsunset{zn}
\glsunset{tl}
\glsunset{pi}
\glsunset{pid}
\glsunset{iae}
\maketitle
The first-order plus delay process model with parameters \gls{k} (gain), \gls{tau} (time constant) and \gls{theta} (delay) is the most used representation of process dynamics.
This paper has three objectives.
First, we derive optimal \gls{pi}- and \gls{pid}-settings for this process.
Optimality is here defined as the minimum Integrated Absolute Error (\gls{iae}) to disturbances for a given robustness level.
The robustness level, which is here defined as the sensitivity peak (\gls{ms}), may be regarded as a tuning parameter.
Second, we compare the optimal \gls{iae}-performance with the simple \gls{simc}-rules, where the \gls{simc} tuning parameter \gls{tauc} is adjusted to get a given robustness.
The ``original'' \gls{simc}-rules give a \gls{pi}-controller for a first-order with delay process, and we find that the \gls{simc} \gls{pi}-controller is close to the optimal \gls{pi}-controller for most values of the process parameters (\gls{k}, \gls{tau}, \gls{theta}).
The only exception is for delay-dominant processes where the \gls{simc}-rule gives a pure integrating controller.
%The ``improved'' \gls{simc} \gls{pi}-rule has been proposed, and more generally we find that performance for processes with time delay may be improved by adding derivative action.
The third objective of this paper is to propose and study a very simple modification to the original \gls{simc}-rule, which is to add a derivative time $\gls{taud}=\gls{theta}/3$ (for the serial \gls{pid}-form).
This gives performance close to the \gls{iae}-optimal \gls{pid} also for delay-dominant processes.
We call this the ``improved'' \gls{simc}-rule, but we put ``improved'' in quotes, because this controller requires more input usage, so in practice the original \gls{simc}-rule, which gives a PI-controller, may be preferred.

\chapter{Introduction}
The \gls{pid} controller is by far the most common controller in industrial practice.
However, although it has only three parameters, it is not easy to tune unless one uses a systematic approach.
The first \gls{pid} tuning rules were introduced by \cite{ziegler1942optimum}.
Although some other empirical rules were suggested, the Ziegler-Nichols (ZN) rules remained for about 50 years as the best and most commonly used rules.
However, there are at least three problems with the ZN-rules:
\begin{enumerate}
\item The ZN-settings are rather aggressive for most processes with oscillations and overshoots.
\item The ZN-rule contains no adjustable tuning parameter to adjust the robustness and make it less aggressive.
\item For a pure time delay process, the ZN-PID settings give instability and the ZN-PI settings give very poor performance (also see discussion section).  

\end{enumerate}

For many years there was almost no academic interest in revisiting the \gls{pid} controller to obtain better tuning rules.
\cite{dahlin1968designing} considered discrete-time controllers and introduced the idea of specifying the desired closed-loop response and from this backing out the controller parameters.
Typically, a first-order response is specified with closed-loop time constant \gls{tauc} (called $\lambda$ by Dahlin).
Importantly, \gls{tauc} (or $\lambda$) is a single tuning parameter which the engineer can use to specify how aggressive the controller should be.
For first or \acrlong{sopd} processes, the resulting controller can be approximated by a \gls{pid} controller.
This idea is also the basis of the \gls{imc} \gls{pid}-controller of \cite{rivera1986internal} which results in similar \gls{pid} tuning rules.
The \gls{imc} \gls{pi}-tuning rules, also known as lambda tuning, became widely used in the pulp and paper industry around 1990 \citep{bialkowski1996control}.

However, the Dahlin and IMC rules set the controller integral time equal to the dominant process time constant (\gls{taui}=\gls{tau}) 
and this means that integral action is effectively turned off for ``slow'' or ``integrating'' processes with a large value of $\tau$.
This may be acceptable for setpoint tracking, but not for load disturbances, that is, for disturbances entering at the plant input.
This led \cite{skogestad2003simple} to suggest the \gls{simc} rule where \gls{taui} is reduced for processes with large time constants. 
However, to avoid slow oscillations it should not be reduced too much, and this led to the SIMC-rule $\tau_i = \min(\tau, 4(\tau_c+\theta)$, where $\theta$ is the effective time delay of the process.

Since about 2000, partly inspired by the work of {\AA}str{\"o}m (e.g., \citep{astrom1988} \citep{astrom1992}), there has been a surge in academic papers on \gls{pid} control as can be seen by the Handbook on \gls{pid} rules by \cite{odwyer2006handbook} which lists hundreds of tuning rules.

In particular, the very simple \gls{simc} \gls{pid} tuning rules \citep{skogestad2003simple} have found widespread industrial acceptance.
However, there has also been suggestions to improve the \gls{simc} rules \citep{haugen2010comparing,lee2013i}. %,diruscio2010tuning}.
One question then naturally arises: Is there any point in searching for better \gls{pid} rules for first-order plus delay processes, 
or are the \gls{simc} rules good enough?
To answer this question, we want in this paper to answer the following three more
detailed questions:
1. What are the optimal \gls{pi} and \gls{pid} settings for a first-order with delay process?
2. How close are the simple \gls{simc} rules to these optimal settings? 3. Can the \gls{simc} rules be improved in a simple manner?

We consider the stable \acrlong{foptd} processes
\begin{equation}
    G(s) = \frac{k e^{-\gls{theta} s}}{(\gls{tau} s +1)},  \label{model}
\end{equation}
where \gls{k} is the process gain, \gls{tau} is the process time constant, and \gls{theta} is the process time delay.
We mainly consider the serial (cascade) form \gls{pid} controller,
\begin{equation}
    K_{\gls{pid}}(s) = \frac{\gls{kc}(\gls{taui} s+1)(\gls{taud} s + 1)}{\gls{taui} s} \label{cascadepid},
\end{equation}
where \gls{kc}, \gls{taui} and \gls{taud} are the controller gain, integral time and derivative time.
The main reason for choosing this form is that the \gls{simc} PID-rules become simpler. 
For the more common parallel (ideal) \gls{pid} implementation
\begin{equation}
	\gls{Kpid_parallel}(s) = \gls{kc}['] \left(1 + \frac{1}{\gls{taui}[']s}+\gls{taud}[']s\right) \label{parallelpid},
%	\gls{Kpid_parallel}(s) = \gls{kp} + \gls{ki}/s + \gls{kd}s = \gls{kc}['] \left(1 + \frac{1}{\gls{taui}[']s}+\gls{taud}[']s\right) \label{parallelpid},
\end{equation}
one must compute the factor $f=1+{\gls{taud}}/{\gls{taui}}$, and use the following settings
\begin{equation}
    \gls{kc}[']=\gls{kc}f,\quad \gls{taui}[']=\gls{taui}f,\quad\text{and}\quad \gls{taud}['] = \gls{taud}/f. \label{eq:parallelpidtrans}
\end{equation}
For \gls{PI}-control, $f=0$ and the two forms are identical.
In addition, a filter \gls{F} is added, at least when there is derivative action, so the overall controller is
\begin{equation}
	\gls{K}(s) = \gls{Kpid}(s)\,\gls{F}(s).
\end{equation}
Normally, we use is a first-order filter,
\begin{equation}
    \gls{F}=\frac{1}{\gls{tauf}s+1}.
\end{equation}
Note that \gls{tauf} is not considered a tuning parameter in this paper, but rather set at a fixed small value, depending on the case.
The filter is generally needed when we have derivative action, and we may write $\gls{tauf}= \gls{taud}/\gls{nf}$ where  $\gls{nf}$ 
often is in the range from 5 to 10. 
For other notation, see Figure \ref{fig:block_diagram}.

% Which aspects that are important and, subsequent, which trade-off between conflicting aspects are appropriate for the controller design, is an engineering decision which depends on the given process and requirements.
% A helpful tool to guide the design process is to show the contours of relevant aspects, such as performance, robustness, and  input usage, graphically as a function of the tuning parameters \citep{huba2013performance}.
% A given tuning rule can then easily be evaluated by overlaying the corresponding parameters into the contour plots.
% By including optimally designed controllers, this graphical method can also be used to evaluate the ``optimality'' of the tuning rules based on the given criteria \citep{garpinger2014performance}.

The main trade-off in controller design is between the benefits of high controller gains (performance) and the disadvantages of high controller gain (robustness and input usage)
%One approach is to show the trade-off plot between two aspects of major concern, typically between performance and input usage
e.g., \citep{boyd1991linear,kristiansson2006evaluation}.
%In this paper, we focus on the trade-off between performance and robustness.
In this paper, we focus on the trade-off between \gls{iae}-performance and \gls{ms}-robustness.
More pricesly, we use the integrated absolute error (\gls{iae}) for combined input and output disturbances as the performance measure and obtain optimal \gls{pi} and \gls{pid} settings for various robustness levels, where robustness is measured in terms of the peak sensitivity (\gls{ms})
%The aim is to clearly show the optimal trade-off between these aspects, and how this trade-off shifts for \gls{pi} and \gls{pid} control for different \gls{foptd} process.
The resulting Pareto-optimal trade-off between performance and robustness is subsequently used to evaluate the \gls{simc} \gls{pi} and \gls{pid} rules.
%Which trade-off between performance and robustness is preferred, is left to the engineer to decide.


% Our first objective is to derive \gls{iae} optimal \gls{pi} and \gls{pid} settings for various robustness levels (in terms of \gls{ms} and \gls{mt}), and to compare the performance of \gls{pi} and \gls{pid} control (Section~\ref{sec:optimal_controller}).
% Next, our objective is to compare the \gls{iae} optimal \gls{pi} and \gls{pid} tunings with those obtained with the \gls{simc} method \citep{skogestad2003simple}.
% The \gls{simc} rule is analytically derived, and from a first or second order process model we can easily obtain \gls{pi} and \gls{pid} controller settings, respectively.
% The \gls{simc} rule has one tuning parameter, the closed-loop time constant $\gls{tauc}$, which can be used to trade off between  performance (``tight'' control) and robustness (``smooth'' control).

The paper is structured as follows.
In Section 2 we define the measures used to quantify the performance/robustness trade-off.
Based, on this optimal \gls{pi} and \gls{pid} controllers are presented in Section 3.
In Section 4 we present the \gls{simc} rules and propose ``improved'' rules, referred to as \gls{isimc} and \gls{i0simc} in this paper.
In Section 5, the various \gls{simc} and the improved rules are \acrshort{isimc} evaluated.
In Section 6, we discuss input usage and some other issues.

Preliminary versions of some of the results were presented in \cite{grimholt2012optimalpi} and \cite{grimholt2013optimalpid}.

\begin{figure}[b]
    \centering
    \input{figs/block_diagram/block_diagram}
    \caption{Block diagram of one degree-of-freedom feedback control system. We may treat a setpoint change (\gls{ys}) as a special case of an output disturbance (\gls{do}).}
    \label{fig:block_diagram}
\end{figure}


\chapter{Quantifying the optimal controller}
The first authors to use the terms ``optimal settings'' for \gls{pid}-control where \cite{ziegler1942optimum} in their classical paper.
Generally, it is difficult to define ``optimality'' of a controller, as there are many important aspects to take into consideration, including set-point response, disturbance rejection, robustness, input usage, and noise sensitivity.
Often a control loop is evaluated solely on the basis of its response to a setpoint change, but in process control, disturbance rejection is usually the major concern.
Another important aspect is robustness, which often is completely omitted.
\cite{aastrom2006advanced} emphasise the need of including all the behaviours of the control loop.

\section{Performance}
In this paper, we quantify performance in terms of the  \gls{iae},
\begin{equation}
    \gls{iae} = \int_0^\infty \abs{\gls{y}(t) - \gls{ys}(t)} \dif t.
\end{equation}
To balance the servo/regulatory trade-off we choose a weighted average of \gls{iae} for a step input disturbance \gls{di} (load disturbance) and a step output disturbance \gls{do}:
\begin{equation}
  \gls{J}(p) = 0.5\,\bigg(\frac{\gls{iae_dy}(p)}{\gls{iae_dy_ref}} +  \frac{\gls{iae_du}(p)}{\gls{iae_du_ref}}\bigg) \label{costfun}
\end{equation}
where \gls{iae_dy_ref} and \gls{iae_du_ref} are weighting factors, and $p$ is the controller parameters.
%Note that the output disturbance \gls{do} is equivalent to a setpoint change since both occur at the output.
Note that we do not consider setpoint responses, but instead output disturbances.
For the system in Figure~\ref{fig:block_diagram}, the closed-loop responses in the error $e=y_s-y$ to an output disturbance \gls{do} 
and to a setpoint change \gls{ys} are identical, except for the sign.   
The difference is that since the setpoint is known we could further enhance the setpoint performance using a two-degrees-of freedom controller
(which is not considered in this paper), 
whereas the unmeasured output disturbance can only be handled by the feedback controller \gls{K} (which is the focus of this paper).
%(Figure \ref{fig:block_diagram}).
Of course, we may consider other disturbance dynamics, but step disturbances at the plant input and output give are believed to be representative for most cases.

The two weighting factors \gls{iae_ref} for  input and output disturbances, respectively, are selected 
as the optimal \gls{iae} values when using \gls{pi} control (as recommended by \cite{boyd1991linear}). %page 63
%(\gls{iae}[$^\circ$]), whereas a single controller $K(p)$ (which may be a \gls{pi} or \gls{pid} controller depending on the case) is used to find  $\gls{iae_dy}(p)$ and $\gls{iae_du}(p)$ when evaluating the \gls{iae} objective $\gls{J}(p)$.
To ensure robust reference \gls{pi} controllers, they are required to have \gls{ms} = 1.59\footnote{For those that are curious about the origin of this specific value \gls{ms} = 1.59, it is the resulting $\gls{ms}$ value for a \gls{simc} tuned \gls{pi} controller with \gls{tauc} = \gls{theta} on \gls{foptd} process with $\gls{tau}\leq 8 \gls{theta}$.}, and the resulting weighting factors are given for four processes in Table~\ref{tabref0}.
Note that two different reference \gls{pi} controllers are used to obtain the weighting factors.

%Actually, in this paper we do not consider setpoint changes (\gls{ys}). That is, \gls{ys} may be considered constant.
%However, we do consider output disturbances $\gls{do}$, which for the so-called one-degree of freedom controller in Figure~\ref{fig:block_diagram} (where there is no filter on \gls{ys}) is equivalent to a setpoint change.

% The optimal controller will depend on the specific disturbance model, and we chose to consider disturbances at the plant output (\gls{do}) and plant input (\gls{di}).
% To get a good balance, we weigh the both equally as given in \eqref{costfun}.


\input{tables/table_wheights}
TODO: Foresl�r for tabell tittel endret til: Reference PI-controllers and resulting weighting factors for four processes. 
TODO: Foresl�r ogs� � kutte resultatene for optimal PI som uansett er gitt i en senere tabell.

\section{Robustness}
Robustness may be defined in many ways, for example, using the classical gain and phase margins, which are related to robustness with respect to the model parameters
$k$ and $\theta$, respectively. However, as a single robustness measure, we in this paper
quantify robustness in terms of \gls{mst}, defined as the largest value of \gls{ms} and \gls{mt} \citep{garpinger2008software},
\begin{equation}
  \gls{mst}=\max\{\gls{ms},\gls{mt}\}.
\end{equation}
where \gls{ms} and \gls{mt} are the largest peaks of the sensitivity $S(s)$ and complimentary sensitivity $T(s)$ functions, respectively.
Mathematically,
\begin{align*}
  \gls{ms} &=\max_{\gls{w}}  \abs{S(j\gls{w})} =  \norm{S(j\gls{w})}_\infty,\\
  \gls{mt} &=\max_{\gls{w}}  \abs{T(j\gls{w})} =  \norm{T(j\gls{w})}_\infty,
\end{align*}
where $\norm{\cdot}_\infty$ is the $H_\infty$ norm (maximum peak as a function of frequency), and the sensitivity transfer functions are defined as
\begin{equation}
    S(s) = \nicefrac{1}{\left(1+G(s)\,K(s)\right)} \quad\text{and}\quad T(s) = 1 - S(s).
\end{equation}
 For most stable processes, \( \gls{ms}\geq\gls{mt} \).
In the frequency domain (Nyquist plot), \gls{ms} is the inverse of the closest distance between the critical point -1 and the loop transfer function $G(s)\,K(s)$.
For robustness, small $\gls{ms}$ and $\gls{mt}$ values are desired, and generally $\gls{ms}$ should not exceed 2.
For a given \gls{ms} we are guaranteed the following \gls{gm} and \gls{pm},\citep{rivera1986internal}.
      \begin{equation}
          \gls{gm} \geq \frac{\gls{ms}}{\gls{ms}-1} \quad\text{and}\quad \gls{pm}\geq 2\arcsin\left(\frac{1}{2\gls{ms}}\right)\geq\frac{1}{\gls{ms}}.
      \end{equation}
For example, \( \gls{ms}=1.6 \) guarantees \( \gls{gm} \geq 2.67 \) and \( \gls{pm} \geq 36.4^{\circ} = 0.64\;\text{rad} \).

% A typical ``good'' value is about 1.6, and notice that $\gls{ms} <\text{1.6}$ guarantees $\text{\gls{gm}}>\text{2.67}$ and $\text{\gls{pm}}>\text{36.4}^\circ$  
% Although they are not as conservative, similar bounds can be formulated for \gls{mt}.



\section{Optimal controller}

% A Pareto optimal curve depicts the trade-off between two conflicting objectives (Figure~\ref{fig:tradeoff_plot_pi}).
% For our case, this conflict is between performance (\gls{J}) and robustness (\gls{mst}).
% As a consequences, have to decide on a compromise between the two objectives.
% That is, if we improve one objective, the other will deteriorate.
% The minimum point of the curve represent the largest \gls{mst} value we would like to use.
% With larger \gls{mst} values than this, performance would deteriorate.

For a given process and given robustness level (\gls{mub}), the \gls{iae}-optimal controller is found  by solving the the following optimization problem:
\begin{align}
\min_{p} \quad \gls{J}(p) = 0.5\,&\bigg(\frac{\gls{iae_dy}(p)}{\gls{iae_dy_ref}} +  \frac{\gls{iae_du}(p)}{\gls{iae_du_ref}}\bigg) \label{eq:costfun_opt}\\[1em]
\text {subject to:} \quad  \gls{ms}(p) &\leq \gls{mub} \label{eq:con_ms}\\
\gls{mt}(p) &\leq \gls{mub} \label{eq:con_mt}
\end{align}
where in this paper the parameter vector $p$ is for a \gls{pi} or \gls{pid} controller.
For more details on how to solve the optimization problem, see \cite{grimholt2015optimization}.
The problem is solved repeatedly for different values of \gls{mub}.
One of the constraints in \eqref{eq:con_ms} or \eqref{eq:con_mt} will be active if there is a trade-off between robustness and performance.
This is the case for values of \gls{mub} less than about 2 to 3.
Usually the \gls{ms}-bound is active, except for integrating processes with a small \gls{mub} (less than about 1.3), where the \gls{mt}-bound is active (see Figure~\ref{fig:tuning_pi}, later).

In retrospect, looking at the results of this paper, we would have obtained similar optimal \gls{pi}- and \gls{pid}-settings
for the process \eqref{model} if we only considered input disturbances for performance and only used \gls{ms} for robustness.

% The Bound on \gls{mst} is implemented with equal upper bounds \gls{mub} on \gls{ms} and \gls{mt}.
% We approximate the constraints \eqref{eq:con_ms} and \eqref{eq:con_mt} by gridding the frequency domain, $$\abs{S(j\gls{w})} \leq M^{ub} \quad\text{and}\quad\abs{T(j\gls{w})} \leq M^{ub} \qquad  \text{for all } \gls{w} \text{ in } \Omega,$$
% where $\Omega$ is the set of selected frequency points.
% This gives one inequality constraint for each grid frequency.
% In addition to handling $S(s)$ and $T(s)$ with multiple peaks, this approximation also improves convergence for \emph{infeasible} initial controllers because more information is supplied to the optimizer.
% On the downside, the approximation results in reduced accuracy and increased computational load;
% However, the benefit gained towards improved convergence properties makes up for this.
% For more information about the implementation of the optimization problem see [!cite ME Optimization paper]
% % TODO: reference PID optimization paper.

% For a proper optimal tuning, the normalization factors should be for the same robustness and controller type as the desired controller.
% Because we want to compare different controllers, for several different conditions, we have to use some fixed scaling to be able to compare.
% To avoid necessary complications and confusion, we chose to fix the normalization factors to a \gls{pi} controller with \gls{mst} = 1.59.
% As a consequence the balance between input-output disturbance rejection might be shifted from what is ``truly'' optimal for a given controller at a given robustness.
% However, from our experience we found that this has little effect on relative difference between cost functions.


% \begin{itemize*}
%     \item Time delay dominated ($\gls{tau}/\gls{theta}=0$)
%     \item Balanced ($\gls{tau}/\gls{theta}=1$)
%     \item Lag dominated ($\gls{tau}/\gls{theta}=8$)
%     \item Integrating ($\gls{tau}/\gls{theta}=\infty$)
% \end{itemize*}




\chapter{Optimal PI and PID control}
\label{sec:optimal_controller}
%In this section we derive optimal \gls{pi} and \gls{pid} settings as a function of \gls{theta}/\gls{tau} for \gls{foptd} process.
%Optimality is here defined as \gls{iae} optimal controller for combined input and output disturbances subjected to robustness constraints as given in Section~\ref{sec:optimal controller}.

\section{Trade-off between robustness and performance and comparison of PI and PID control}

In this section, we present \gls{iae}-optimal (\gls{J}) settings for \gls{pi} and \gls{pid} controllers as a function of the robustness level (\gls{mst}).
However, before presenting the optimal settings, we show in Figure~\ref{fig:tradeoff_plot_tiny} the Pareto optimal \gls{iae}-performance (\gls{J}) as a function of robustness (\gls{mst}) for optimal \gls{pi} and \gls{pid} controllers for three processes.
Note that the curves in Figure~\ref{fig:tradeoff_plot_tiny} stop when \gls{mst} is between 2 and 3.
This is because performance (\gls{J}) actually gets worse and the curve for \gls{J} bends upwards 
\citep{grimholt2012optimalpi} when \gls{mst} increases beyond this value.
Thus, there is no trade-off and the region with \gls{mst} larger than about 2 should be avoided.

We see from Figure~\ref{fig:tradeoff_plot_tiny} that for a pure time delay process there is no advantage in adding derivative action; and it is optimal to use simple \gls{pi} control.
As the time constant \gls{tau} increases, the benefit of using derivative action also increases.
For an integrating process, derivative action improves IAE-performance by about 40\%, compared to optimal \gls{pi} control.
This is emphasised again in Figure~\ref{fig:cost_vs_tau_pid}, where performance is shown as a function of the normalized time constant for robust controllers with \gls{mst}~=~1.4.
\begin{figure}[htb]
    \includewithpath{figs/tradeoff_plots_opt_tiny/main}
    \caption{Pareto-optimal \gls{iae}-performance (\gls{J}) for \gls{pi} and \gls{pid} control. }
    \label{fig:tradeoff_plot_tiny}
\end{figure}



\begin{figure}[ht]
    \centering
    \def\annotate{0}
    \includewithpath{figs/performance_PI_PID/main}
    \caption{\gls{pid} control: Normalized \gls{iae}-optimal performance for \gls{mst}~=~1.4 as a function of the normalized time constant \gls{tau}/\gls{theta}.}
    \label{fig:cost_vs_tau_pid}
\end{figure}


\section{Optimal PI control}
\input{tables/table_opt_simc_isimc_pi.tex}
TODO: 1. Endre tittel i tabell fra "Performance of" til "Comparison of". 
      2. Trykkfeil: Endre Optimal PID til Optimal PI i kolonneoverskrift.

The \gls{iae}-optimal \gls{pi} settings are shown graphically in Figure~\ref{fig:tuning_pi} as a function of \gls{tau}/\gls{theta} for different robustness levels (\gls{mst}) 
and are also given for $M_s=1.59$ for four processes in Table~\ref{tabrefisimc_pi}.
For \gls{pi} control we observe three main regions (Figure \ref{fig:tuning_pi}) in terms of optimal integral time \gls{taui}:
\vspace{\normalbaselineskip}

\begin{minipage}{\linewidth}
\begin{tabular}{l@{\hspace{3\tabcolsep}} r@{\hspace{0\tabcolsep}} c@{\hspace{0\tabcolsep}} l@{\hspace{3\tabcolsep}} l}
    \emph{Delay dominant:} &         & \gls{tau}/\gls{theta} & $< 0.4$   & $\gls{taui}\approx\gls{theta}/3$ \\
    \emph{Balanced:}       & $0.4 <$ & \gls{tau}/\gls{theta} & $< 4$     & $\gls{taui}\approx\gls{tau}$     \\
    \emph{Lag dominant:\footnote{Where \gls{k} depends on \gls{mst} ($\gls{k} \approx 6$ for \gls{mst}~=~1.59).}}   & $  4 <$ & \gls{tau}/\gls{theta} &           & $\gls{taui}\approx k\gls{theta}$\\
\end{tabular}
\end{minipage}



\vspace{\normalbaselineskip}

These regions match well the classification of \acrlong{foptd} processes in \cite{garpinger2014performance}.

In contrast with the \acrshort{imc} rules \citep{rivera1986internal} and the \gls{simc} rules \citep{skogestad2003simple}, the optimal controller does not converge to a pure integral controller ($K_\textsc{i}(s)=\gls{ki}/s$, corresponding to $\tau_i\rightarrow 0$) as $\gls{tau}/\gls{theta}\rightarrow0$ (Figure~\ref{fig:tuning_pi}).
Rather, for a pure time delay processes, the integral time is approximately \gls{theta}/3, which we will use in the proposed \gls{isimc}-\gls{pid} and \gls{i0simc} rules (see below).
The optimal integral time of about \gls{theta}/3 is almost independent of the robustness level (\gls{mst}-values) . %of interest (which from Figure~\ref{fig:tradeoff_plot_tiny} is \gls{mst}~<~1.9).
%On the other hand, the controller gain (\gls{kc}) depends on the robustness \gls{mst}, but is insensitive to the value of the time constant (\gls{tau}).
For balanced processes, the integral time is similar to the time constant ($\gls{taui}\approx\gls{tau}$, see dashed line), and also almost independent of 
the robustness level.
This value agrees with the \acrshort{imc} and \gls{simc} rules.

For lag-dominant processes (with $\gls{tau} > 4 \gls{theta}$),
the integral time for \gls{mst}~=~1.59 approaches \gls{taui}~=~6.22\gls{theta} for \gls{tau}/\gls{theta}~=~$\infty$ (integrating process) 
(Figure~\ref{fig:tuning_pi}, lower right).
This is somewhat smaller than the value \gls{taui}~=~8\gls{theta} obtained from the \gls{simc} rule.
%for the same value of  \gls{mst}~=~1.59. % (see discussion section for further details).
Also the normalized controller gain, \gls{kc}\gls{k}\gls{theta}/\gls{tau} approaches a constant value as \gls{tau} goes to infinity 
(Figure~\ref{fig:tuning_pi}, upper right).
For example, for \gls{mst}~=~1.59, the optimal value is \gls{kc}\gls{k}\gls{theta}/\gls{tau}~=~0.414 for \gls{tau}/\gls{theta}~=~50, and 0.409 for 
\gls{tau}/\gls{theta}~=~$\infty$ (integrating process). This is close to the value \gls{kc}\gls{k}\gls{theta}/\gls{tau}~=~0.5 obtained with the \gls{simc}-rule with  \gls{mst}~=~1.59.

%Notice that when \gls{mst} increases (less robustness), the optimal controller gain increases whereas the integral time decreases.

\begin{figure}[h]
    \centering
    \def\annotate{0}
    \includewithpath{figs/opt_tuning_pi_new/main}
    \caption{\gls{pi} control: \gls{iae}-optimal settings as a function of \gls{tau}/\gls{theta} for five values of \gls{mst}.}
    \label{fig:tuning_pi}
\end{figure}


\section{Optimal PID control}
\input{tables/tab_simc_op}

The \gls{iae}-optimal \gls{pid} settings are shown graphically in Figure~\ref{fig:tuning_pid}
and are also given for $M_s=1.59$ for four processes in Table~\ref{tables/table_op}.
The optimal \gls{pid} settings can be divided into the same regions as for \gls{pi} control.
Note that for a pure time delay process, it is optimal with \gls{pi} control, that is, it is optimal to have \gls{taud}~=~$0$ and \gls{taui}~=~\gls{theta}/3.
Actually, if we allow for having the derivative time larger than the integral time, then we could interpret it differently, and say that for a pure time delay process,
the optimal controller is a \gls{id}-controller with
\gls{taui}~=~$0$ and \gls{taud}~=~\gls{theta}/3. We will see that this latter interpretation is consistent with the proposed improved \gls{simc} \gls{pid}-rule,
whereas the first interpretation is consistent with the
improved \gls{simc} \gls{pi}-rule.

For \gls{pid}-control, the balanced region ($0.2 < \tau/\theta 4$) can be divided in two.
In the lower part (\gls{tau}/\gls{theta}<1.25), the optimal derivative and integral time are the same, $\gls{taui}=\gls{taud}$, and increase with  \gls{tau}/\gls{theta}.
In the upper part, \gls{taui} increases with \gls{tau}/\gls{theta}, whereas \gls{taud} remains approximately constant.
Note that the region with \gls{taui}~=~\gls{taud} agrees with the recommendation of 
\cite{ziegler1942optimum}\footnote{\cite{ziegler1942optimum} recommend the integral time to be 4 times the derivative time for the parallel (ideal) \gls{pid} controller, which for the serial (cascade) \gls{pid} form corresponds to \gls{taui}=\gls{taud}, see \eqref{eq:parallelpidtrans}.}.
However, we see from Figure~\ref{fig:tuning_pid} that \gls{taui}~=~\gls{taud} is optimal only for a fairly small range of \acrlong{foptd} processes  with \gls{tau}/\gls{theta} between about 0.2 and 1.25.
%Actually, because the serial \gls{pid} controller is limited to only having real zeros, this indicates that performance (\gls{J}) could be improved further in this region for these processes by using the parallel (ideal) \gls{pid} controller.
%This is investigated further in Section~\ref{sec:parallel_pid}, where we find the benefits are small.

From Figure \ref{fig:tuning_pid} we see that the integral time (\gls{taui}) is smaller than the process time constant (\gls{tau}) for all processes with $\gls{tau}/\gls{theta}>4$, whereas we found that $\gls{taui}\approx\gls{tau}$ was optimal in the balanced region for \gls{pi} control.
For given values of \gls{mst}, the optimal \gls{pid} controller gain is slightly larger than the optimal \gls{pi} controller gain, and the integral action is also larger (with a lower value of \gls{taui}).
%Because introducing derivative action increases robustness, this allows for additional use of integral action (lower value of \gls{taui}) compared with \gls{pi} control.

For lag-dominant processes ($\gls{tau}/\gls{theta}>4$), the normalized controller gain \gls{kc}\gls{k}\gls{theta}/\gls{tau} approaches a constant value as $\gls{tau}\rightarrow\infty$.
For example, for $\gls{mst}=1.59$ we have $\gls{kc}\gls{k}\gls{theta}/\gls{tau}\rightarrow0.54$.
%, as \gls{tau} goes to infinity, approaches \gls{kc}k\gls{theta}/\gls{tau}~=~0.54  for \gls{mst}~=~1.59 (Figure~\ref{fig:tuning_pid}, top right).
The same can be observed for the integral and derivative times which for $\gls{mst}=1.59$ approach \gls{taui}/\gls{theta}~=~3.24 and  \gls{taud}/\gls{theta}~=~0.48, respectively (Figure \ref{fig:tuning_pid}, bottom right).
For increasing \gls{mst} values (less robustness), the optimal controller gain increases and the optimal integral time decreases.
Interestingly, for all lag-dominant processes the optimal derivative time is $\gls{taud}\approx 0.47 \gls{theta}$ almost independent of the \gls{mst}-value.

\begin{figure}[h]
    \centering
    \def\annotate{0}
    \includewithpath{figs/opt_tuning_pid_new/main}
    \caption{\gls{pid} control: optimal settings as a function of \gls{tau}/\gls{theta} for five values of \gls{mst}.}
    \label{fig:tuning_pid}
\end{figure}


\section{Parallel vs. serial PID controller}
\label{sec:parallel_pid}

The above optimization was for the serial \gls{pid} controller in \eqref{cascadepid}.
A more general \gls{pid} controller is the parallel, or ideal, \gls{pid} controller in \eqref{parallelpid}, which allows for complex zeroes.
The parallel \gls{pid} controller is better only for processes with \gls{tau}/\gls{theta} between 0.4 and 1.2, which is the region  where \gls{taui}~=~\gls{taud} (two identical real zeros) for the serial \gls{pid} controller.
Furthermore, the improvement with the parallel (ideal) \gls{pid} form is very minor as illustrated in Figure~\ref{fig:par-cas-dif}, which compares the \gls{iae} performance for a ``balanced'' process with \gls{tau}/\gls{theta}~=~1.
Therefore, the serial \gls{pid} implementation in \eqref{cascadepid} is sufficient for \acrlong{foptd} processes.
\begin{figure}[hbt]
    \centering
    \includewithpath{figs/opt_ideal_vs_cascade_new/main}
    \caption{\gls{pid} control: Comparison of \gls{iae}-optimal performance (\gls{J}) for serial \gls{pid} control \eqref{cascadepid} and parallel \gls{pid} control \eqref{parallelpid} for a process with \gls{tau}/\gls{theta}~=~1.}
    \label{fig:par-cas-dif}
\end{figure}

\chapter{The original and improved SIMC rules}

\section{Original SIMC rule}
We consider the first-order with delay process in \eqref{model}.
The original \gls{simc} \gls{pid} tunings for this process give a \gls{pi} controller \citep{skogestad2003simple}:
\begin{equation}
\gls{kc} = \frac{1}{\gls{k}}\frac{\gls{tau}}{(\gls{tauc}+\gls{theta})},\quad \gls{taui} =  \min \left\{\gls{tau},\; 4(\gls{tauc}+\gls{theta}) \right\}.
\label{eq:simc}
\end{equation}
Here the closed-loop time constant \gls{tauc} is an adjustable tuning parameter which is used to get the desired trade-off between output performance, robustness and input usage.
For  ``tight control'' (good performance) with acceptable robustness (\gls{ms} about 1.6 to 1.7), \cite{skogestad2003simple} recommends selecting \gls{tauc}~=~\gls{theta}.
However, in many cases ``smooth control'' is desired and we should use a larger value for \gls{tauc}.



\section{``Improved'' SIMC rule with derivative action (\emph{i}SIMC)}
In this paper, we propose the ``improved'' \gls{simc} \gls{pid}-rule for a first-order with delay process.
Since an important feature of the \gls{simc} rules is simplicity, we keep the same expressions for \gls{kc} and \gls{taui} as in the original \gls{pi}-rule in \eqref{eq:simc}, but derivative action is added to improve the performance for a time delay,
\begin{equation}
    \gls{isimc}:\quad  \gls{taud}  =  \gls{theta}/3 \label{eq:isimc}
\end{equation}
Note that the \gls{isimc} tunings are for the serial \gls{pid} implementation in \eqref{cascadepid}.
For the more common parallel (ideal) \gls{pid} implementation in \eqref{parallelpid},
one must compute the factor $f=1+{\gls{taud}}/{\gls{taui}}$ and use the values in \eqref{eq:parallelpidtrans}.

As seen from Figure~\ref{fig:tuning_pid}), the value \gls{taud}~=~\gls{theta}/3 is close to the optimal for a pure time delay process (with \gls{tau}~=~$0$).
For larger values of process time constant \gls{tau}, the optimal value of \gls{taud} is closer to \gls{theta}/2.
However,  we chose to use the smaller value $\gls{taud}=\gls{theta}/3$ in order to reduce possible other disadvantages of adding derivative action.

If we use the same value for the tuning constant (e.g. \gls{tauc} = \gls{theta}) as for the original \gls{simc} \gls{pi} controller in \eqref{eq:simc}, 
then the addition of the derivative action in \eqref{eq:isimc} mainly improves robustness (lower \gls{ms}).
However, the main reason for introducing derivative action is usually to improve performance, and to achieve this one should reduce \gls{tauc}.
In the original \gls{simc} rule \citep{skogestad2003simple} it was recommended to select \gls{tauc}~=~\gls{theta} to achieve ``tight control'' with acceptable robustness (\gls{ms} about 1.6 to 1.7).
However, as will become clearer from the results below, for the \gls{isimc} \gls{pid} rule we recommend reducing the value of \gls{tauc} and select \gls{tauc}~$\geq$~\gls{theta}/2.

The \gls{simc} \gls{pi}-tunings parameters with \gls{tauc}~=~\gls{theta} and the \gls{isimc} \gls{pid}-tunings with \gls{tauc}~=~\gls{theta}/2 are given for four first-order plus delay processes in Table~\ref{tabsimcpo}.
As seen from, \gls{isimc} \gls{pid}-improves \gls{iae} performance (\gls{J}) by about 30\% compared to the original \gls{simc} \gls{pi} controller, while keeping about the same robustness level (\gls{mst} about 1.7).

\input{tables/table_simc}

Note that we have put ``improved'' in quotes for the \gls{isimc} rule.
Indeed, in the original \gls{simc} paper, \cite{skogestad2003simple} considered adding the derivative time \gls{taud}~=~\gls{theta}/2 to counteract time delay, but concluded that it was probably not worth the increased complexity of the controller and the increased sensitivity to measurement noise and input usage.
Therefore, in most practical situations in industry, the original \gls{simc} \gls{pi}-rule is most likely preferable.
Nevertheless, if performance is important and \gls{tauc} is adjusted as mentioned above, then the results of this paper show (e.g. see Figure \ref{fig:tradeoff_plot_pid}), that significant improvements in performance may be achieved with the \gls{isimc} rule.
Additionally, we have found that \gls{pid} control with \gls{isimc} tunings is better in almost all respects than a well-tuned Smith Predictor controller \citep{grimholt2018}. %TODO: ref. to PID'18 paper).



\section{Alternative improved SIMC rule without derivative action (\emph{i}SIMC-PI) for delay dominant processes}
Note that for a pure time delay process ($\tau=0$), the \gls{isimc} \gls{pid}-controller in (\ref{eq:simc}-\ref{eq:isimc}) is actually a \gls{id}-controller, since \gls{kc}~=~$0$.
As noted earlier this \gls{id}-controller (with $\tau_d=\theta/3$ and $\tau_i=0$) may be realized instead as a \gls{pi}-controller (with $\tau_i=\theta/3$ and $\tau_d=0$).
This is the basis for the following ``improved'' \gls{simc} \gls{pi} rule for a \gls{foptd} process, 
denoted \gls{i0simc} \citep{skogestad2015simc}:
\begin{equation}
  \gls{i0simc}:\quad    \gls{kc} = \frac{1}{\gls{k}}\frac{\gls{tau} + \gls{theta}/3}{(\gls{tauc}+\gls{theta})},\quad \gls{taui} =  \min \left\{\gls{tau}+\gls{theta}/3,\; 4(\gls{tauc}+\gls{theta}) \right\}. 
	\label{eq:i0simc}
\end{equation}
Note that for a pure time delay process (\gls{tau}~=~$0$), the \gls{isimc} \gls{pid}-controller in (\ref{eq:simc}-\ref{eq:isimc}) and the \gls{i0simc} \gls{pi}-controller in (\ref{eq:i0simc})  are identical.
%That is, both may be represented as \gls{pi} controllers.
%The reason is that the \gls{isimc} \gls{pid} rule gives \gls{taui}~=~\gls{tau}~=~$0$ (see the \gls{simc} rule \eqref{eq:simc}), and we may instead set \gls{taui} equal to the derivative time in \gls{isimc} \eqref{eq:isimc}.
The \gls{i0simc} tunings in (\ref{eq:i0simc}) may give significant performance improvements benefits compared to the original \gls{simc} \gls{pi}-tunings for delay-dominant processes, but at the expense of larger input usage.
However, for processes with \gls{tau}~>~\gls{theta}/2, approximately, we find that the benefits are marginal or even negative.



\chapter{Evaluation of the SIMC and \emph{i}SIMC rules}
\section{SIMC PI-rule (original)}

% The \gls{simc} \gls{pi} settings \citep{skogestad2003simple} for a \gls{foptd} model are% (cascade or ideal form)
% \begin{equation}
%     \gls{kc} = \frac{1}{\gls{k}}\frac{\gls{tau}}{(\gls{tauc}+\gls{theta})},\quad \gls{taui} =  \min \left\{\gls{tau},\; 4(\gls{tauc}+\gls{theta}) \right\},\quad \text{ and}\quad \gls{taud} = 0.
% \end{equation}
% For a ``fast and robust'' setting, \gls{tauc}~=~\gls{theta} is recommended.
% The corresponding \gls{simc} tuning parameters for \gls{tauc}~=~\gls{theta}  are given for the four processes in Table~\ref{tabsimcpo}.
We compare in Figure~\ref{fig:tradeoff_plot_pi} the Pareto-optimal \gls{iae} performance (\gls{J}) of the \gls{simc} \gls{pi} controller with the \gls{iae}-optimal \gls{pi} controller for four different processes.
The \gls{pi} settings for \gls{mst}~=~1.59 are given in Table~\ref{tabrefisimc_pi}.
In addiion, the \gls{simc} controllers for three specific choices of the tuning parameter,
 \begin{itemize*}
 \item $\gls{tauc}=1.5\gls{theta}$ (smoother tuning)
 \item $\gls{tauc}=\gls{theta}$ (tight/redcommended tuning)
 \item $\gls{tauc}=0.5 \gls{theta}$ (more aggressive tuning)
 \end{itemize*}
are shown by circles.
For the \gls{simc} controller (Figure~\ref{fig:tradeoff_plot_pi}), the trade-off curves were generated by varying the tuning parameter 
$\gls{tauc}$ from a large to a small value. 
Except for the pure time delay process, the  IAE-performance \gls{simc} \gls{pi}-controller is very close (within 10\%) 
to the \gls{iae}-optimal \gls{pi} controller for all robustness levels.
In other words, by adjusting $\tau_c$ we can generate a close-to-optimal PI-optimal controller with a given desired robustness.
Another important observation is that the default SIMC-recommendation
for ``tight'' control, $\tau_c=\theta$ (as given by middle of the three circles), in all cases
is located in a desired part of the trade-off region, well before we reach the
minimum. Also, the recommended choice gives a fairly constant $M_s$-value, in the range from 1.59 to 1.7.
From this we conclude that, except for the pure time delay process, there is little room to improve on the \gls{simc} \gls{pi} rule, at least when performance and robustness are as defined above (\gls{J} and \gls{ms}).

\begin{figure}[h]
    \includewithpath{figs/tradeoff_plots_pi/main}
    \caption{\gls{pi} control: Pareto optimal \gls{iae}-performance (\gls{J}) for optimal-\gls{pi}, \gls{simc} \eqref{eq:simc}, and \gls{i0simc} \eqref{eq:i0simc} control for four processes.
	The trade-off for \gls{simc} and \gls{i0simc} is generated by changing the value of the closed-loop tuning constant \gls{tauc}.}
    \label{fig:tradeoff_plot_pi}
\end{figure}

\section{Improved SIMC PI rule (\emph{i}SIMC-PI)}
The main ``problem'' with the original \gls{simc} rule is for pure time delay processes,  where the \gls{iae}-performance (\gls{J}) is about 40\% higher than the optimal (Figure~\ref{fig:tradeoff_plot_pi}).
The proposed \gls{i0simc} rule in (\ref{i0simc}) rectifies this.
As seen from Figure~\ref{fig:tradeoff_plot_pi} (upper left), the proposed \gls{i0simc} rule is almost identical to the \gls{iae}-optimal controller when \gls{tauc} is adjusted to give the same robustness (\gls{mst}).
This is further illustrated by the simulation in Figure~\ref{fig:step-plot_t0}.
%This is further illustrated by the closed-loop simulations in Figure~\ref{fig:step-plot_t0}, where the response, although being nice and smooth, is somewhat sluggish initially.
%This is because the \gls{simc} controller is actually a pure \gls{i} controller with \gls{kc} = $0$, \gls{taui} = $0$ and \gls{ki}~=~\gls{kc}/\gls{taui}~=~0.5.
%On the other hand, the \gls{iae} optimal \gls{pi} controller (with minimum \gls{J} for \gls{ms} = 1.59) has \gls{kc} about 0.2 and \gls{taui} about 0.32 (and \gls{ki} = 0.62).
%Fortunately, as already observed, the optimal \gls{pi} controller for a pure time delay process (Figure~\ref{fig:tradeoff_plot_pi}), has an almost fixed integral time of approximately \gls{theta}/3 for all values of \gls{mst} between 1.4 and 1.7. (Figure \ref{fig:tuning_pi}, bottom).
%This result was used when developing the \gls{i0simc} and \gls{isimc}.


% Because \gls{pi} and \gls{id} controllers are equivalent, there are two possible implementations:
% \begin{enumerate*}
% \item Adding \gls{theta}/3 to the time constant \gls{tau} in the \gls{simc} rule (\gls{i0simc}).
% \item Using derivative action \gls{taud} equal to \gls{theta}/3 (\acrshort{isimc}, discussion).
% \end{enumerate*}
% Implementation  1 was used in our first proposal for an improved rule.
% This give a \gls{pi} controller for the time delay process, and as the time constant \gls{tau} increases it approach the original \gls{simc} tuning rule.




\begin{figure}[tb]
    \centering
    \includewithpath{figs/ny_step/t0_step/main}
    \caption{Time response for optimal, \gls{simc} and \gls{isimc} controllers (\gls{mst}=1.59) for an input/output disturbance (at time 0/1) for the pure time delay process $G(s)=e^{-s}$.
    For pure time delay process the input \gls{u} response is equal to the output \gls{y} response time shifted one time delay earlier.
    Also the response is the same for an input or output disturbance (but shifted).
    Note that for a pure time delay process there is no benefit of adding derivative action (\gls{taud}~=~$0$ is optimal).}
    \label{fig:step-plot_t0}
\end{figure}




%\section{\emph{i}$_\text{0}$SIMC for PI control on FOPTD}
%Replacing \gls{tau} by \gls{tau}~+~\gls{theta}/3 in the \gls{simc} rule, markedly improves the the performance for a pure time delay process (Figure~\ref{fig:tradeoff_plot_pi}).
%This gives a simple modifications, which is important because ``simplicity'' was one of the main objectives when the \gls{simc} rule where originally derived.
%Additionally, \gls{i0simc} is very  similar to \gls{simc} for intermediate and lag dominated process, which is where the \gls{simc} rule was close-to optimal.
%A similar change, but with $\gls{theta}/2$ rather than $\gls{theta}/3$, was originally proposed by \cite{rivera1986internal} for their improved \gls{pi} tuning rule, and the effectiveness of this modification is also clear from the paper of \cite{foley2005comparison}.
%However, as seen in Figure~\ref{fig:step-plot_t0}, the response with this \gls{imc} \gls{pi} controller also settles rather slowly towards the setpoint, indicating that the integral time $\gls{theta}/2$ is too large.


\section{Improved SIMC PID rule (\emph{i}SIMC)}
Next, we consider \gls{pid} control, that is, the addition of derivative action using \gls{taud}~=~\gls{theta}/3, as proposed with the \gls{isimc} rule \eqref{eq:isimc}.
We compare in Figure~\ref{fig:tradeoff_plot_pid} the \gls{iae} performance (\gls{J}) of the \gls{isimc} \gls{pid} controller with the \gls{iae} optimal \gls{pid} controller with the same robustness (\gls{mst}) for four different processes (green curves).
\gls{pid} settings for \gls{mst}~=~1.59 are given in Table~\ref{tabrefsimc}.
To illustrate the benefits of derivative action we also show in Figure~\ref{fig:tradeoff_plot_pid} the curves with \gls{pi} control (blue curves).
%It is common to introduce derivative action to improve performance for processes with time delay, e.g. \gls{taud}~=~\gls{theta}/2 \citep{rivera1986internal}.
%However, based on analytical derivations and simulations, \citet{skogestad2003simple} found that adding \gls{taud}~=~\gls{theta}/2 only marginally improved performance.
%This is is also the case with \gls{isimc}.
%Tuning \gls{isimc} (\gls{pid}) with \gls{tauc} = \gls{theta} only marginally improves performance compared to \gls{simc} (\gls{pi}) (middle circle, Figure \ref{fig:tradeoff_plot_pid}).

We see from  Figure~\ref{fig:tradeoff_plot_pid} that the SIMC PID-controller (dashed green curve) is close to the optimal PID-controller (solid green line) for all four processes and al robustness levels.
By considering the location of the middle  green circles, we see that if we keep the value of \gls{tauc} unchanged at \gls{tauc}~=~\gls{theta}, then adding derivative action mainly improves robustness.
For example, for an integrating process and \gls{tauc}~=~\gls{theta}, the value of \gls{mst} is improved from 1.70 for \gls{pi} to 1.46 for \gls{pid}, but there is only a 6\%  improvement in performance.
%This is somewhat conflicting to what we have found so far, where introducing \gls{taud}~=~\gls{theta}/3 substantially improved performance ($\approx$ 40\% improvement, Figure~\ref{fig:tradeoff_plot_tiny}).
%However, due to this added robustness for \gls{isimc}, we can
However, by reducing \gls{tauc} we can significantly improve performance for a given \gls{mst} value.
%For example, for an integrating process we obtain with \gls{mst} fixed at 1.7, a 34\% improvement in performance (lower \gls{iae}) with the  \gls{isimc} rule  (\gls{pid}) rule compared to the original \gls{simc} (\gls{pi}).
For the four processes, we see from Figure~\ref{fig:tradeoff_plot_pid} that \gls{tauc} = \gls{theta}/2 (rightmost green circles) is a good choice for the tuning constant  for the \gls{isimc} \gls{pid} controller.
Compared to  \gls{simc} \gls{pi} controller tuned with \gls{tauc} = \gls{theta, this gives about 30\% better \gls{iae}-performance and similar robustness  (\gls{mst} about 1.7). %; see Table~\ref{tabsimcpo}.



\begin{figure}[h]
    \includewithpath{figs/tradeoff_plots_pid/main}
    \caption{Pareto optimal \gls{iae}-performance ($J$) as a function of robustness \gls{mst} for optimal \gls{pi} and \gls{pid},  and \gls{simc} \eqref{eq:simc}, \gls{isimc} \eqref{eq:isimc} and \gls{zn} for four processes.
    The trade-off for the various \gls{simc} rules are generated by changing the value of the closed-loop tuning constant \gls{tauc}.
    \gls{pi} controllers are shown with blue and \gls{pid} controllers with green.}
    \label{fig:tradeoff_plot_pid}
\end{figure}


\begin{figure}[h]
    \centering
    \includewithpath{figs/step_integrating/main}
      \caption{Time response for optimal \gls{pi} and \gls{pid} compared with \gls{simc} and \gls{isimc} controllers (\gls{mst} = 1.59) for an output disturbance (at time $0$) and an input disturbances (at time 20), for an integrating process $G(s)={e^{-s}}/{s}$. To get a proper system, a first order measurement filter with $\gls{tauf}=0.02$ was applied to the \gls{pid} controllers.}
     \label{fig:step-plot}
\end{figure}



%\input{tables/tab_simc_op}

We said that the SIMC PID-controller  is close to the optimal PID-controller. 
However, we see from the two lower plots in Figure~\ref{fig:tradeoff_plot_pid} that the performance loss is somewhat larger for processes with large time constants.
To study this further, we compare in Figure~\ref{fig:step-plot} the step responses for various \gls{pi} and \gls{pid} controllers for an integrating process.
Because of a larger integral time, the \gls{simc} and  \gls{isimc} controllers settle more slowly than the optimal \gls{pi} and \gls{pid} controllers for both input and output disturbances.
This results in a 22\% higher average \gls{iae}-performance (\gls{J}) for the \gls{isimc} \gls{pid} controller when compared with the optimal \gls{pid} controller.
However, it is usually the maximum deviation that is of main concern in industry.
Because of a larger controller gain, the \gls{simc} controllers have roughly the same peak deviation as the optimal \gls{pi} and \gls{pid} controllers for input disturbance (see Figure~\ref{fig:step-plot}), and a smaller overshoot for output disturbances (setpoint) than the optimal.
Thus, we conclude that the performance of the \gls{simc} controllers are better than indicated from the \gls{iae}-value ($J$), when we take into account other aspects of performance.
In conclusion, also for \gls{pid} control, we conclude that \gls{isimc} is close to the optimal \gls{pid}-controller, so the benefit of looking for even more ``improved'' rules for \acrlong{foptd} processes is limited.


\chapter{Discussion}

\section{Input usage and filtering}
Input usage is an important aspect for control, but have not been explicitly treated in this work.
From Figure~\ref{fig:block_diagram} we have
$$
\gls{u}=-\gls{T}\;\gls{di}-\gls{KS}\,\left(\gls{do}+\gls{n}\right).
$$
Thus, input usage is determined by two transfer functions: $\gls{T} = \gls{G}\gls{K}/(1+\gls{G}\gls{K})$ (for input disturbance) and $\gls{K}\gls{S} = \gls{K}/(1+\gls{G}\gls{K})$ (for output disturbance and noise).
Input disturbances will not pose a new problem because \gls{T} is closely related to performance and is in addition already bounded by \gls{mt}.

The important new transfer function is therefore \gls{KS}, and by limiting its peak one can adjust input usage related to measurement noise and output disturbances \citep{kristiansson2002robust}.
For \gls{pi} control, \gls{KS} has a peak at intermediate frequencies which is approximately  \citep{aastrom2006advanced}:
%For a given \gls{ms} value, the optimal \gls{pid} controller has a higher gain than the optimal \gls{pi} controller.
%Thus, as expected, optimal \gls{pid} control have more input usage than \gls{pi} control.
%For \gls{pi} control, this intermediate peak will dominate and
\begin{equation}
    \norm{KS}_\infty^{\gls{pi}} \approx \gls{kc}\gls{ms}.
\end{equation}
Here, \gls{ms} is already bounded in our analysis, and is typically smaller than 1.7.
Thus, we find that the controller gain \gls{kc} provides direct information about the input usage related to measurement noise and output disturbances.

For \gls{pid} control, the value of $\abs{\gls{KS}}$ is generally higher at higher frequencies, and we find the input usage is dominated by the selected measurement filter.
If there is no measurement filtering, $\gls{tauf}={0}$, then the high-frequency peak goes to infinity.
Therefore, for \gls{pid} control it is important to filter out the high frequency noise, and the resulting
peak will depend heavily on the selected filter time constant.
With a first or second order measurement filter
\begin{equation}
    F_1(s)=\frac{1}{\gls{tauf}s+1} \quad \text{or} \quad F_2(s)=\frac{1}{(\gls{tauf}s)^2+\sqrt{2}\gls{tauf}s+1},
\end{equation}
the high-frequency peak can be approximated by
%$\abs{KS(j\gls{w})}=\gls{kc}\gls{taud}/\gls{tauf} = \alpha k_c$,
%We may write $\gls{tauf}=\gls{taud}/\gls{nf}$ where \gls{nf} is typically between 5 and 10.
%Generally $\gls{nf}>\gls{ms}^{\gls{pid}}$, and the maximum peak simplifies to
\begin{equation}
    \norm{KS}_\infty^{\gls{pid}} \approx \gls{nf}\gls{kc}
\end{equation}
where $\alpha = \tau_d/\tau_f$. 
Note that $\tau_f$ here is for the 
cascade PID-controller in \label{cascadepid} and not for the ideal form in \eqref{parallelpid}.
Typically, $\alpha$ is between 5 and 10.
The ratio in input magnitude between \gls{pi} and \gls{pid} related to measurement noise and output disturbances can then be expressed as
\begin{equation}
    \frac{\norm{KS}_\infty^{\gls{pid}}}{\norm{KS}_\infty^{\gls{pi}}} \approx \frac{\gls{kc}[^{\gls{pid}}]}{\gls{kc}[^{\gls{pi}}]}\frac{\gls{nf}}{\gls{ms}[^{\gls{pi}}]}.% \sim \frac{\gls{nf}}{\gls{ms}[^{\gls{pi}}]}.
\end{equation}
With the recommended tight tuning ($\gls{tauc}=\gls{theta}$ for \gls{simc} \gls{pi} and $\gls{tauc}=\gls{theta}/2$ for \gls{isimc} \gls{pid}), we get $\frac{\gls{kc}[^{\gls{pid}}]}{\gls{kc}^{\gls{pi}}} = (\gls{theta} + \gls{theta})/(\gls{theta}/2 + \gls{theta}) = 1.33$ and the ratio in input usage can be expressed as
\begin{equation}
	\frac{\norm{KS}_\infty^{\gls{isimc}(\gls{pid})}}{\norm{KS}_\infty^{\gls{simc}(\gls{pi})}} \approx \tfrac{1.33}{1.6} \gls{nf} \approx 0.8 \gls{nf}
\end{equation}
where we  have assumed $\gls{ms}[^{\gls{pi}}]$ to be 1.6.
Since \gls{nf} is typically larger than 5, this means that the improved \gls{iae} performance of \gls{pid} control may require an input magnitude related to measurement noise and output disturbances
which is at least 4 times larger than for \gls{pi} control
\footnote{We have assumed that the selected filter does not influence controller performance and robustness in a significant way.
Otherwise, we have a \gls{pidf} controller where also the filter constant \gls{tauf} should be considered a degree of freedom in the optimization problem.}.

Trade-off curves for \gls{isimc} with different first-order measurement filters are shown in Figure~\ref{fig:filer_trade_off}.
For the recommended \gls{pid} tuning, \gls{tauc}~=~\gls{theta}/2, performance and robustness will deteriorate with increased measurement filtering.
With \gls{tauc}~=~\gls{theta}/2 and \gls{nf}~=~3, the robustness is quite low, and a retuning of the controller by selecting a larger $\tau_c$ might be necessary.
With \gls{nf}=1, we recover the original \gls{simc} PI-controller for which we recommend  \gls{tauc}~=~\gls{theta} to get a good trade-off between performance and robustness. 

Based on Figure~\ref{fig:filer_trade_off}, we recommend for PID-control to choose
%However, a value lower of \gls{nf} is probably more reasonable.
\gls{nf} in the range from 5 to 10, which gives most of the benefit of the D-action. 
The high-frequency input usage may then increase by a factor 4 to 8 compared to \gls{pi}-control.
This increase in input usage may be undesirable, so for many real process applications where performance is not the key issue, the original \gls{simc} rule, which gives a PI-controller, is the best choice.

If noise filtering is an important factor, an iterative design approach can be used in combination with \gls{simc} to ensure that the controller has both good robustness and low noise sensitivity \citep{segovia2014design}.

\begin{figure}
    \centering
    \includewithpath{figs/tradeoff_plots_filter_1order/main}
    \caption{Performance/robustness trade-off curve for the \gls{isimc} (\gls{pid}) controller with measurement filtering. The \gls{simc} (\gls{pi}) controller corresponds to the case with $\alpha=1$.}
    \label{fig:filer_trade_off}
\end{figure}



\section{Trade-off between input and output disturbance response}



As already noted from Table~\ref{tabref0} and observed from the simulations in Figure~\ref{fig:step_balance}, 
the optimal controller that minimizes the average \gls{iae} performance (\gls{J}) in \eqref{eq:costfun_opt}, puts more emphasis on 
disturbance rejection at the input (\gls{iae_du}) than at the output (\gls{iae_dy}), especially for larger values of the process time constant.
For example, for an integrating process we find  \gls{niae_du} = 1.02 (close to optimal for input disturbance), whereas  \gls{niae_dy}=1.99 (twice the optimal).
This is further illustrated in Figure~\ref{fig:balance}, where we show ratio between the two terms in the \gls{iae}-performance index \gls{J} \citep{huba2013performance}, which in this paper we term \emph{controller balance},
\begin{equation}
    \text{controller balance} = \frac{\gls{iae_du}}{\gls{iae_du_ref}}/\frac{\gls{iae_dy}}{\gls{iae_dy_ref}},
\end{equation}
as a function of \gls{tau}/\gls{theta}.
From Figure~\ref{fig:balance}, we also note that for time constants less than about 3\gls{theta}, the optimal controller has roughly equal weight on input and output (also seen in Figure~\ref{fig:step_balance}, top).
For larger time constants, the emphasis shifts towards input disturbances.
Interestingly, if we use a cost function with only a small weight (1\%) on input disturbances
\begin{gather}
  \gls{J}(p) = \bigg(0.99\,\frac{\gls{iae_dy}(p)}{\gls{iae_dy_ref}} +  0.01\,\frac{\gls{iae_du}(p)}{\gls{iae_du_ref}}\bigg) \label{eq:c_int_rule},
\end{gather}
we find for an integrating process the optimal settings \gls{kc}~=~\text{0.462} and \gls{taui}~=~\text{12.2}\gls{theta}, with \gls{niae_du}~=~1.72 and \gls{niae_dy}~=~1.91. % Flere desimaler,   1.8270   1.9889
We notice that there is only a minor improvement in setpoint performance (\gls{iae_dy} decreases about 4\%), %  from 1.99 to 1.83.  % CHRISS: todo, DU M� SJEKKE  (jeg endret fra 7 til 14%)  chriss: ok! should be after should be 1.92, change 1-1.92/1.98=0.303.
whereas disturbance rejection is much worse (\gls{iae_du} increases about 69\%). % changes from 1.02 to 1.83 % CHRISS: todo, Sjekk! chriss: OK!
The conclusion is this that we may put emphasis mainly on input disturbances when tuning \gls{pi} controllers for lag-dominated processes.

\begin{figure}[!tb]
    \begin{center}
    \includewithpath{figs/step_balance_26/main}
    \includewithpath{figs/step_balance_5/main}
    \includewithpath{figs/step_balance_inf/main}
    \caption{Comparison of step disturbance responses of \gls{iae} optimal controller which minimzes \gls{J}, with the two reference controllers that consider disturbances only at the output (\gls{iae_dy_ref}) and input (\gls{iae_du_ref}), respectively. All controllers have \gls{mst}~=~1.59 (Table~\ref{tabref0}).}
    \label{fig:step_balance}
    \end{center}
\end{figure}

\begin{figure}[tb]
    \begin{center}
    \includewithpath{figs/balance/main}
    \caption{Controller balance between input and output disturbances, defined as (\gls{iae_du}/\gls{iae_du_ref})/(\gls{iae_dy}/\gls{iae_dy_ref}), for optimal \gls{pi}~control as a function of the time constant \gls{tau}/\gls{theta} (\gls{mst} = 1.59).}
    \label{fig:balance}
    \end{center}
\end{figure}


\section{Further evaluation of SIMC PI rule for integrating processes}

\label{sec:c_discussion}
%However there has been reports that the \gls{simc} rule have sluggish disturbance rejection for integrating processes \citep{haugen2010comparing,diruscio2010tuning}.
%This is discussed in more detail in the Section~\ref{sec:c_discussion}.
When comparing the optimal \gls{pi} settings with the original \gls{simc} rule for an integrating process, we find that the \gls{simc} integral time is larger than the optimal (Figure~\ref{fig:tuning_pi}, bottom).
Specifically, for an integrating process with \gls{tauc} = \gls{theta}  (giving \gls{mst} = 1.70), the \gls{simc} rule gives \gls{taui}/\gls{theta} = 8, whereas the optimal performance (\gls{J}) for the same robustness 
is with \gls{taui}/\gls{theta}=5.6.
This indicates that  the \gls{simc} rule puts more emphasis on output disturbances than input disturbances, tham for the IAE-optimal controller witrh equal weighting.
To shift the trade-off between output (setpoint) and input disturbance, one may introduce an extra parameter in the tuning rule \citep{alcantara2010model,diruscio2010tuning}.
\cite{haugen2010comparing} suggested to introduce an extra servo/regulator trade-off parameter \gls{c} in the expression for the integral time,
\begin{equation}
\gls{taui} = \min \lbrace \gls{tau},\;\gls{c}(\gls{tauc}+\gls{theta}) \rbrace,
\end{equation}
where \gls{c} = 4 gives the original \gls{simc} rule.
However, introducing an extra parameter adds complexity, and the potential performance benefit of approximately 10\% (see Figure~\ref{fig:tradeoff_plot_pi}) does not seem sufficiently large to justify it.
Nevertheless, one may consider choosing another (lower) fixed value for \gls{c}, and \cite{haugen2010comparing} suggests using \gls{c} = 2 to improve performance for input disturbances.
If we use the recommended tuning \gls{tauc} = \gls{theta}, we find indeed that \gls{iae} performance \gls{J} is improved compared to \gls{simc} (see Figure~\ref{fig:simc4vs2}).
However, robustness is worse, with \gls{mst} close to 2 (where the \gls{simc} rule gives \gls{mst} close to 1.7).
More importantly, as seen from Figure~\ref{fig:simc4vs2} the \gls{simc} performance is better if we decrease $\gls{tauc}$ to get the same robustness in terms of \gls{mst}.
In fact, \gls{simc} is closer to the Pareto optimal curve for most values of \gls{mst}.
Actually, a better fixed value would be \gls{c} = 3.
However, changing the parameter \gls{c} causes the recommended tuning \gls{tauc} = \gls{theta} to shift to the less robust region.
In summary, we find that the value \gls{c} = 4 in the original \gls{simc} rule provides a well balanced servo/regulator trade-off.
To improve performance for input disturbances on an integrating process, we recommend decreasing the tuning constant \gls{tauc}/\gls{theta}, say to around 0.7, rather than changing the value of \gls{c}.

\begin{figure}[tb]
    \begin{center}
        \includewithpath{figs/haugen_trade_off/main}
        \caption{\gls{pi} control: Evaluation of suggested modification \gls{c} = 2 in \eqref{eq:c_int_rule} for integrating process.}
        \label{fig:simc4vs2}
    \end{center}
\end{figure}

.

\section{\emph{i}SIMC for second-order plus delay process}

For a second-order plus delay process,
\begin{equation}
  \gls{G} = \frac{\gls{k}e^{-\gls{theta}s}}{(\gls{tau1}s+1) (\gls{tau2}s+1)}
\end{equation}
where $\gls{tau1} > \gls{tau2}$, the original \gls{simc} rule gives a \gls{pid} controller on the series form \eqref{cascadepid} with
%with \gls{kc} and \gls{taui} as given in \eqref{eq:simc} and  \gls{taud}~=~\gls{tau2}:
\begin{equation}
\gls{kc} = \frac{1}{\gls{k}}\frac{\gls{tau}}{(\gls{tauc}+\gls{theta})},\quad \gls{taui} =  \min \left\{\gls{tau},\; 4(\gls{tauc}+\gls{theta}) \right\}, \quad \tau_d=\tau_2.
\label{eq:simcpid}
\end{equation}
The direct extension of the \gls{isimc} rule would be to add another derivative term, $(\frac{\gls{theta}}{3}s+1)$, to the numerator of the \gls{pid} controller in \eqref{cascadepid}.
First, this would not be a standard industrial controller and, second, it would give even more aggressive input usage.
Thus, to get a \gls{pid} controller, the following modified derivative time is recommended \footnote{If \gls{tau2} is very large, specifically if $\gls{tau2} > 4(\gls{tauc}+\gls{theta}$), then one should approximate the process as a double integrating process, $\gls{G}(s) \approx \gls{k}''e^{-\gls{theta} s}/s^2$ with $\gls{k}'' = k/(\gls{tau1} \gls{tau2})$, and use the \gls{pid}-tunings for a double integrating process \citep{skogestad2003simple}.}
\begin{equation}
  \gls{isimc}:\quad \gls{taud} = \gls{tau2} + \gls{theta}/3
\end{equation}
with the controller gain and integral time as given in \eqref{eq:simcpid}. 
To get a good trade-off between performance and robustness, we may select $\tau_c=\theta$, but $\tau_c$ may be reduced
towards $\theta/2$ for processes where $\tau_2$ is smaller than $\theta/3$.
Again, to get settings for the parallel (ideal) PID-controller in \eqref{parallellpid} one must
compute the factor $f=1+{\gls{taud}}/{\gls{taui}}$, and use \eqref{eq:parallelpidtrans}.

%NO: Mustthen adjust also Kc with term td/tau2:
% \min \left\{\gls{tau2} + \gls{theta}/3\; 4(\gls{tauc}+\gls{theta}) \right\}. \end{equation}
%Note that, similar to the expression for the integral time, we have introduced an upper value for $\tau_d$ equal to  $4(\gls{tauc}+\gls{theta})$
%to better handle processes with a large value of $\tau_2$, for example, a double integrating process which corresponds to $\tau_2\rightarrow \infty$; see \cite{skogestad2003simple}.
%Note that, similar to \gls{i0simc} in \eqref{eq:i0simc}, the benefit of using $\gls{taud}=\gls{taui} + \gls{theta}/3$ (iSIMC) compared to using $\gls{taud}=\gls{tau2}$ (SIMC) is only significant when $\gls{tau2} < \gls{theta}$, approximately.
%The benefits of using derivative action for a second-order process may be significant, especially if \gls{tau2} is large.
%Furthermore, we will only for \gls{tau2}~=~$0$ get the full additional benefits of \gls{isimc}, and the benefits are reduced as the value of \gls{tau2} increases.





%The benefits of using derivative action for a second-order process may be significant, especially if \gls{tau2} is large.
%Furthermore, we will only for \gls{tau2}~=~$0$ get the full additional benefits of \gls{isimc}, and the benefits are reduced as the value of \gls{tau2} increases.

\section{Ziegler-Nichols tuning rule}
We also show in Figure~\ref{fig:tradeoff_plot_pid} by red triangles the location of the classical  \cite{ziegler1942optimum}  (\gls{zn}) \gls{pi} and \gls{pid} controllers. 
The ZN-tunings are obtained by first bringing the process to sustained oscilattions using a P-controller and recording the resulting ``ultimate'' period and controller gain.
Since the \gls{zn} rules have no tuning parameter we get a single point in Figure~\ref{fig:tradeoff_plot_pid}.
With exception of the pure time delay process (where \gls{zn}-\gls{pid} is unstable and \gls{zn}-\gls{pi} has very poor performance), the \gls{iae} performance for \acrshort{zn} is very good, but the \acrshort{zn} controllers are located in the ``flat'' trade-off region with poor robustness (large \gls{mst} value).

The Ziegler-Nichols PID tuning rules were the by far most used rules for about 50 years, up to about 1990. 
The very poor performance of the ZN rules for pure time delay processes may then partly explain the myth that "time delay compensators", 
such as the Smith Predictor, 
		may give significant performance benefits compared to PI- or PID-control for processes with large time delays \citep{grimholt2018}.
%There exist numerous improved \gls{zn} rules, such as \cite{tyreus1992tuning} and \cite{hegglund2002revisiting} which give an improved performance/robustness relationship compared to \gls{zn}.
%However, we chose to include the original \gls{zn} rule as this is the most famous tuning r/closelyule, and is usually the first tuning method people learn.
%The poor rubustness led Tyreus and Luyben (\acrshort{tl}) to modify the \acrshort{zn}-rule and propose less agressive settings.
%Indeed, we see from Figure~\ref{fig:tradeoff_plot_pi}, that the \acrshort{tl}-settings are more robust and are located close to the optimal trade-off curve for lag-dominant processes, For delay-dominant process, both \acrshort{zn} and \acrshort{tl} result in poor settings

\chapter{Conclusion}

The \gls{iae}-optimal \gls{pi}- and \gls{pid}-settings for a first-order plus delay process \eqref{model} are shown for various robustness levels (as expressed by the \gls{ms}-value) in Figures \ref{fig:tuning_pi} and \ref{fig:tuning_pid}, respectively.
However, in practice, we recommend using the SIMC-rules for PI- and PID-tuning.

For \gls{pi}-control, Figure \ref{fig:tradeoff_plot_pi} shows that the ``original'' \gls{simc} rule in (\ref{eq:simc}) \citep{skogestad2003simple} gives close-to optimal \gls{pi}-performance.
That is, by adjusting the tuning constant \gls{tauc} to get a desired robustnes, we can closely track the Pareto-optimal trade-off curve between performance and robustness.
The only exception is for delay-dominant \gls{foptd} processes, where the \gls{simc} proportional gain is too small, but this can be corrected for by using
the \gls{i0simc} rule in (\ref{eq:i0simc}.

For \gls{pid}-control, we propose the \gls{isimc} rule where derivative action with \gls{taud}~=~\gls{theta}/3 (\ref{eq:isimc}) is added. Note that
this is for the cascade PID-controller in \eqref{cascadepid}.
Figure \ref{fig:tradeoff_plot_pid} shows that this rule gives close-to optimal \gls{pid}-performance, even for delay-dominant processes.
For a pure time delay process, the  \gls{isimc} \gls{pid}-controller is an \gls{id}-controller which can by rewritten 
%as a \gls{pi}-controller,
%Thus, for delay-dominant processes, one may instead use a \gls{pi}-controller as suggsted by the \gls{i0simc} rule in (\ref{eq:i0simc}).
to give the \gls{i0simc} rule in (\ref{eq:i0simc}).

The improved performance/robustness trade-off of the \gls{i0simc} and \gls{isimc} rules, comes at the expense of increased input usage in response to measurement noise, output disturbances and setpoint changes.
Thus, for most industrial cases where output performance is not the main concern, the original \gls{simc} rule may be the best choice.


\bibliographystyle{plainnat}
\bibliography{bibliography}

Nye:


\cite{grimholt2018}
Should we forget the Smith Predictor? 
C. Grimholt and S. Skogestad
3rd IFAC conference on Advances in PID control, Ghent, Belgium, 9-11 May 2018.
.

\cite{astrom1988}
Automatic tuning of PID controllers
K.J.�str�m (Astrom) and T. Hagglund
ISA, 1988

\cite{astrom1992}
  author = {{\AA}str{\"o}m, K.J. and Hang, C.C. and Persson, P. and Ho, W.K.},
  title = {Towards Intelligent PID Control},
  journal = {Automatica},
 year = {1992},
  volume = {28},
  pages = {1-9},

\cite{lee2013}
J Lee, W Cho and TF Edgar, "Simple Analytic PID Controller Rules Revisited", I&EC Research, Vol. 53, 5038-5047 (2013)





\end{document}



1) Despite recognizing the value of the contribution of the study, there are a number of technical issues that need to be addressed. The authors need to address the comments of the reviewers in detail. 

Response: The paper has been thoroughly revised following the comments from the reviewes (see details below).

2) It is not clear why one would opt for the proposed optimal tuning rules over existing techniques.

response: The introduction has been completely rewritten to make this clearer.

3) The Pareto solution yields a certain arbitrariness in the tuning rules that needs to be clarified.

Response: The recommendation is to be in the trade-off region between performance and robustness with Ms in the region from 1.6 to 1.7 (see below)

4) The impact of process nonlinearity is not addressed. This is a major consideration in practice. A statement of robustness is required.

Response: Nonlinearity is not mentioned by the reviewers as far as we can see, but we know the Editor is concerned about this.
Of course, use of a linear controller and linear analysis on a real nonlinear system involves a leap of faith, but
we think that it makes little sense that every paper that deals with linear control has to justify why one can use linear analysis.
We think that history and practical applications has proven over and over again that linear analysis is acceptable is most cases.
Having said this, robustness is of course important and we have chosen to look at the Ms-value (where 1/Ms is the distance to the 
-1 point in the Nyquist plot).  We have expanded the introductory part on robustness, because we agree that it was too brief.

Reviewer #1.

"The paper proposes a lot of results, analyzed in detail, but in my opinion, for better understanding, the methodology and the values used in the analysis e.g. Ms or Mst (as an example) have to be carefully introduced before to be used in the discussions. 
It is the same for the optimization problem. What is original in the optimization problem presented here when compared to the state of the art? To add value to the paper and increase its interest, I suggest including status in the field. "

Response: The introductory sections have been completely rewritten and expanded to take this into account.

"An important issue that has to be addressed, in my opinion, is the influence of the uncertainty on the identification of k, tau and theta, for a given process."

Response: Going into identification is outside the scope of this paper, but we have mentioned that the Ms-bounds give proven limits on gain margin and phase margin. 

"Finally, the paper was structured in 6 small sections. Instead, I suggest regrouping sections; the use of tables and figures when reading the paper is rather difficult because of this. "

Response. The paper has been reorganized by moving some parts to the Discussion. This should take care of some of the reviewers concerns.

"Additional questions and minor remarks can be found in the attached file."

response: We thank the rviewer for the detailed comments, which we have mostly followed.

Reviewer #2.

"Determining the Pareto curves stresses that an infinite number (any point on the curve) could be one particular tuning rule. At least, this is clear. However, in this era of "machine learning", proposing optimal tuning rules seems a bit outdated, and a fight lost in advance. What is the main argument that the authors have to propose to explain their arbitrary choice?"

Response: Since the SIMC-rule has a tuning parameter (tauc) one has to make a choice, which is one of the advantages compared to the classical ZN-rules where there is
no tuning parameter. This is now made clear in the introduction. We give a recommendation of selecting tauc=theta/2 (where theta is the process delay) for
the iSIMC-rule. the basis for this choice is to get a Ms-value (robustness) of about 1.6 to 1.7. We would not say that this is arbitrary.

"On the down side, I am surprised that the literature review is to slim, and full of self-citations. This topic has been covered again and again. I remember reading several articles by S Tavakoli, PJ Fleming on the same subject, where these authors provided other "optimal" rules. I am sure that dozens of authors have proposed "optimal" solutions to the same problem. "

Response: The author is correct, there are hundreds of rules, and we have now referred to the book by O'Dwyer. However, note that the SIMC-rules
(and closely realted lambda tuning) are regarded as the simplest ones and the widely used in industry today. The introduction has been rewritten to
make this clearer.

"Finally, is there any chance that these rules could be used in practice, and replace the celebrated "auto-tuning" by Astrom-Hagglund"

Response: As mentioned, the SIMC-rules are already widely used in industry. I know that the have been implemented in "auto-tuners" but I don't think
they are widely used for this purpose. Of course, an auto-tuner also needs an identification procedure, which mustcome in addition to the tuning rule.




