Keywords

1 Introduction

Although well known since the 1930s, the proportional–integral–derivative (PID) controllers are popularly used in many applications of control engineering even today. Huge efforts are made in order to optimize its control behaviour and to optimally adjust a PID controller’s parameters to a specific use case. Therefore, classical PID control is still subject to many ongoing projects of applied research.

To optimally adjust the PID controller’s parameters, an accurate model of the plant which should be controlled should be known or developed. Depending on the level of abstractness of a specific process, this step can pose a problem. Thus, different tuning methods for PID controllers exist. With the help of these methods, such as the Ziegler-Nichols (ZN) [1] or T-Sum [2] methods, it is possible to heuristically find close enough parameters to achieve a good performance of the process. Kumar et al. [3] as well as Wang et al. [4] compare in their works the various tuning paradigms with respect to different plant and controller topographies. The current research offers an online adaption of PID controllers in dependence from time-variant parameters to overcome one of the major downsides in the PID control. Approaches to this have been available since the 1990s, as is shown, for example, by Sung et al. in [5]. Despite that, two modern and more sophisticated approaches for controllers are now used more and more often, to control not only nonlinear, time-variant processes. The Fuzzy Set Theory [6], or Fuzzy-Logic (FL) was first applied to control problems in 1974 by Mamdani [7], and a general overview of the possible industrial applications of Fuzzy Control as compared to PID controllers is given in [8]. By its help the system behaviour and the desired control reaction can be described by linguistic variables and, therefore, is easy to adapt to a plant the exact parameters of which are unknown. The second modern control approach is based on Artificial Neural Networks (ANN). Even though the theory behind simple ANN is also fairly old, first postulated in 1943 by McCulloch and Pitts [9], only recently it was actually applied to different problems in engineering and information technology. Different principles of Neural Network Control (NNC) have evolved since the 1990s as is shown in [10]. Current research in control theory focuses on merging the advantages of classical PID control with FL (Deng et al. [11]) and ANN approaches in order to adapt PID parameters during the process runtime. Application of NNC to robotic manipulators is shown in [12] by Shuzhi et al., whereas Potekhin et al. [13] investigate a Fuzzy Neural Network for controlling autonomous decentralized energy grids.

This work shows a comparison between the PID tuning methods, FL and ANN control. The aim of this work is to indicate which of the methods has the best performance as along with the lowest implementation effort. For the PID tuning methods, the ZN and T-Sum ones, are chosen, while a Mamdani-FL controller and another one based on Feed-Forward-ANN is used for simulation of the controllers and the process.

2 Different Control Approaches

Three classes of controllers are compared in this work. PID Controllers and those based on FL and ANN are the main control paradigms used in closed-loop control applications. This section gives an overview of the theory and systematic schemes behind the different types of controllers and their respective tuning methods.

2.1 PID-Control

A PID controller is composed of three individual parts, hence is the name of proportional–integral–derivative controller. Linking these three blocks in parallel results in the general transfer function for a PID controller in the Laplacian domain

$$ K_{PID} \left( s \right) = K_{P} + \frac{{K_{l} }}{s} + K_{D} s = K_{P} \left( {1 + \frac{1}{{T_{l} s}} + T_{D} s} \right), $$
(2.1)

where \( T_{l} = K_{P} /K_{l} \) is called the reset time and \( T_{D} = K_{D} /K_{P} \) is called the lead time [14]. By transforming Eq. (2.1) back to the time domain as shown in Eq. (2.2), the dependence of the controller’s output u(t) from the control error e(t) is easily derived:

$$ u\left( t \right) = K_{P} e\left( t \right) + \frac{{K_{P} }}{{T_{l} }}\int\limits_{0}^{t} {e\left( \tau \right)d\tau } + K_{P} T_{D} \frac{de\left( t \right)}{dt}. $$
(2.2)

A graphical presentation of a PID controller with the control error and control output in the Laplacian domain can be seen in Fig. 1. If the plant is well known and can be modelled mathematically without further difficulties, numerical methods to set the parameters are preferred. However, it is not always practical to invest a lot of time and resources into developing an adequate mathematical model of the respective plant. Therefore, different tuning methods exist which make it possible to heuristically find near-optimal solutions for the parameters of the PID controller.

Fig. 1.
figure 1

Block diagram of a PID controller

2.1.1 Ziegler-Nichols Tuning Method

While the Ziegler-Nichols method [1] has been known since 1942, it is still used today, mainly for strongly delayed processes. The ZN method proposes two different approaches; one of the two being presented here. The plant is approximated as a first-order plus time delay model. The time delay of the plant \( T_{dead} \), the time constant T and the stationary amplification \( K_{s} \) have to be known or determined experimentally from the system’s step response by adding an inflexion tangent to the step response of the system. The time between the zero point of the time scale, when the step was applied to the plant, and the intersection of the inflexion tangent with the time axis can be considered equal to \( T_{dead} \), while the time between the intersection of the inflection tangent with the x-axis and with the stable output of the plant is equal to T. The PID controllers’ parameters are then adjusted in the following way: \( K_{P} = 1.2/K_{s} \cdot T/T_{dead} \), \( T_{l} = 2 \cdot T_{dead} \) and \( T_{D} = 0.5 \cdot T_{dead} \). Other tuning methods, like Chien-Hrones-Reswick [15], are based on the second method of ZN.

2.1.2 T-Sum Tuning Method

The T-Sum method was first introduced in 1995 by Kuhn [2]. Together with other approaches, like the one proposed by Åström and Hägglund [16], it stands for a modern and more sophisticated approach to PID tuning. It can be used for plants which can be characterized by a low-pass behaviour and have the transfer function as:

$$ G\left( s \right) = K_{s} \frac{{\left( {1 + T_{U,1} s} \right)\left( {1 + T_{U,2} s} \right) \ldots \left( {1 + T_{U,m} s} \right)}}{{\left( {1 + T_{L,1} s} \right)\left( {1 + T_{L,2} s} \right) \ldots \left( {1 + T_{L,n} s} \right)}}e^{{ - sT_{dead} }} $$
(2.3)

The T-Sum tuning method is named after the main operation necessary to adjust the PID parameters with its help, the sum of the delaying time constants \( T_{L} \) in the numerator of Eq. (2.3) minus the deriving time constants in the denominator and plus the dead time:

$$ T_{\varSigma } = T_{dead} + \sum\limits_{i = 1}^{n} {T_{L,i} } - \sum\limits_{j = 1}^{m} {T_{U,j} } . $$
(2.4)

If the transfer function of the plant is unknown, the T-Sum shown in Eq. (2.4) can also be obtained from the experimentally found step response of the plant, either arithmetically (2.5)

$$ T_{\varSigma } = \int\limits_{0}^{\infty } {\left( {1 - \frac{y\left( t \right)}{{K_{s} }}} \right)} dt $$
(2.5)

or graphically from the step response of the system, which is denoted as y(t) in (2.5). Graphically, the value of \( T_{\varSigma } \) can be derived by introducing a straight line, perpendicular to the time axis. This straight line divides the area between it and the y-axis under the step response and above the x-axis from the area above the step response and below the steady state of it between this straight line and the steady state of the step response. When these two areas are equal (\( A_{1} = A_{2} \) in Fig. 2), the value for \( T_{\varSigma } \) can be directly seen from the position of this straight line on the time axis, as shown in Fig. 2. The values for the PID’s parameters can then be directly seen from Table 1 the original T-Sum method and from Table 2 the fast T-Sum method, which compromises a higher overshoot for a faster settling time.

Fig. 2.
figure 2

Graphical determination of the T-Sum

Table 1. Parameters for the T-Sum method (Original)
Table 2. Parameters for the T-Sum method (Fast)

2.2 Fuzzy Control

Unlike PID controllers, which are parametrized either by mathematical modelling or experimental knowledge, fuzzy control relies more on previous knowledge in terms of heuristic IF <condition> THEN <action> rules. Therefore, designing a fuzzy controller is actually similar to the experimental method for constructing a table of inputs and corresponding output values called a ruleset in Fuzzy Logic. What makes FL interesting, though, is that due to the fuzzification of the inputs, not only the situations actually listed in the respective ruleset result in an action, but also all intermediate values which at least partially correspond to one of the if-conditions. To achieve this, the reference input e(t) of the FL controller is mapped to a value in the range [0, 1].

This certain value is called degree of belief in FL and is achieved by applying the fuzzy membership functions (see Fig. 3) to the crisp input e(t). A typical FL controller is composed of the fuzzification of the reference input, which is then led to the Fuzzy Inference System (FIS). Depending on the respective if-then rules in the rule base, the FIS infers a certain fuzzy control input u(t), which is then defuzzified and applied to the plant of the control loop [17]. This can be seen schematically in Fig. 4.

Fig. 3.
figure 3

Exemplary membership functions

Fig. 4.
figure 4

Schema of a fuzzy controller

A big advantage of fuzzy controllers is their ability to work with plants with uncontinuous transfer functions and their robustness when a plant with time-variant behaviour is controlled [17]. The first applications of FL to control problems were proposed by Sugeno in [18].

2.3 Neural Network Control

Neural Network Control is another approach to control systems that has emerged lately from the huge interest in ANN. In the general ANN research, ANN are classified by their structure, which are feed-forward, radial-basis functions, convolutional or long-short term memory ANN among others. For NNC, though, Agarwal [10] tried to classify different controllers. The basic principle of ANN relies on small, independent neurons, inspired by the biological processes of the brain of living organisms, which multiply n input signals, by the respective weights \( w_{1} , \ldots ,w_{n} \). The weighted input signals are then summed up with a possible bias of the тeuron and fed to a specific activation function, which gives back the output of the neuron. Literature sources, e.g., [19] or [20], present a more detailed introduction to ANN.

One of the main advantages of NNC is the ability of feed-forward ANN with nonlinear, differentiable activation functions to approximate any given function, even if the function is nonlinear [21]. This is used in the first step towards building a NNC, when the plant’s transfer function is approximated with the help of ANN, instead of being analytically modelled manually. The second step, the actual NNC, profits from one of the main reasons why the ANN are so popular nowadays: i.e., their ability to learn. Due to this fact, it is possible to build adaptive controllers with the help of ANN [22]. However, the necessity of the structure of the ANN to be determined a-priori, the control task can pose a problem because it can lead to an overdetermined network structure resulting in high computational complexity, or to an underdetermined structure causing poor performance of an actual controller [21].

3 Experimental Set-Up

In the course of this work, three different control paradigms are simulated in Matlab/Simulink R2016B. The control reference e(t) is implemented by a unified step at the time t = 0. The obtained unified step response of the plant for different controllers is then compared.

3.1 Plant

In order to compare the performance of the controllers, a plant for the control loop should be chosen. Due to its wide range of applications, a DC motor is selected; it can be modelled according to the Newton (3.1) and Kirchhoff (3.2) laws

$$ J\frac{{d^{2}\uptheta}}{{dt^{2} }} = t - b\frac{{d\uptheta}}{dt}; $$
(3.1)
$$ L_{a} \frac{di}{dt} = - R_{a} i + V - e $$
(3.2)

as a second order plant. A DC motor can be modelled in more detail as well, the representation in the form of a linear PT2 element is chosen due to the possibility to model a variety of different control problems in this form of a second order plant. Figure 5 represents the model of the plant which is created in Simulink. In order to study the impact that time-variant behaviour of the plant produces on the different controllers, the values of the plant parameters are altered after the controllers have been adjusted to it. This adjustment lies in the range of plus or minus 20% for each parameter and is, therefore, by all means within the range of deviations that the parameters of individual components of the same series may have or may acquire over the time [23]. The changes applied to the plant parameters after the optimization of the controllers can be seen in Table 3.

Fig. 5.
figure 5

DC motor modelled as a linear second order plant in simulink

Table 3. Change of plant parameters to simulate change over the time

3.2 Controllers

A PID controller is realized by the use of respective gain blocks, integrators and derivative blocks, just as shown in Fig. 1 The different parameters of the PID controller are then derived from the step response of the plant, using the 2nd ZN method, as well as the original and fast adjustment values from the T-Sum method. This results in the following parameters for PID controllers that are shown in Table 4.

Table 4. Parameters for the PID controller

The fuzzy controller as well as the neural network controller is chosen from the respective toolbox in Simulink. For the fuzzy controller, a Mamdani approach with two input variables (control reference e(t) and fed-back plant output y(t)) and the control output u(t) is applied. Five triangular membership functions (a positive and negative ones for the control reference and a positive, negative and zero ones for the feedback signal) and three output membership functions are implemented with a respective ruleset. The membership functions for the input and output variables can be seen in Fig. 6.

Fig. 6.
figure 6

Membership functions of the implemented fuzzy controller

Similarly, a controller from the neural network toolbox in Simulink is chosen to characterize the implementation and the behaviour of such a type of controller. The chosen NN predictive controller [24] has a specific control horizon of discrete steps in which the plant’s behaviour is predicted and the necessary control actions are performed (the control horizon). These parameters are set to ten and eight respectively. The controller is trained by random control reference inputs in a given range of values and time. During a training session with the presented plant, a series of 5000 discrete time steps is run over the NN with a batch size of 10. The layers consist of eight neurons each, and the weights are optimized by using a 1-dimensional backtracking algorithm in Matlab. Figure 7 shows the architecture of the NN used in the controller.

Fig. 7.
figure 7

Architecture of the NN predictive controller

4 Results

The simulation is first carried out with the plant’s parameters for which the controllers were optimised and it can be seen in Fig. 8. In order to assess the performance of different controllers, a unified method to quantify the plant’s output is necessary. Important parameters used to evaluate controller’s performance with the use of the step response are the overshoot of the plant’s output y(t) over the reference signal e(t), the settling time (in dependence from a certain error criteria), and the stationary error. In this work, the settling time is evaluated with respect to a deviation of 0.8% from the stationary signal. In order to include all of these parameters in the estimation, the root mean squared error (RMS) of the discrete signals y and e (4.1) is used:

Fig. 8.
figure 8

Comparison of the step responses of the control loop with the original parameters

$$ {\text{RMS}} = \sqrt {\frac{{\sum\nolimits_{i = 1}^{n} {\left( {e_{i} - y_{i} } \right)^{2} } }}{n}} . $$
(4.1)

The RMS, the overshoot and the settling time are shown in the following Table 5 for different controllers. None of the controllers showed a stationary error. After the plant’s parameters were altered, the simulation is carried out again. The results can be seen in Fig. 9 and Table 6 respectively. In order to be able to quantify the influence that the change of the plant’s parameters has on the controller’s performance, the difference of the RMS from Table 5 \( {\text{RMS}}_{old} \) and the RMS with the changed plant’s parameters \( {\text{RMS}}_{new} \) is computed (4.2):

Table 5. Key performance indicators for the controllers, original plant parameter
Fig. 9.
figure 9

Comparison of the step responses of the control loop with the changed parameters

Table 6. Key performance indicators for the controllers, changed plant parameter
$$ \Delta_{\text{RMS}} = \frac{{{\text{RMS}}_{old} - {\text{RMS}}_{new} }}{{{\text{RMS}}_{old} }} \cdot 100\% $$
(4.2)

It can be seen that the results of the different control paradigms differ. In view of the minimal error criteria, the ZN-tuned PID controller shows the best result, even though it has the highest overshoot exceeding those of the controller with the parameters set by the fast T-Sum method by more than the factor three. The FL controller shows the best behaviour in terms of the overshoot but in terms of the RMS error criteria it is at the bottom together with the NN predictive controller. This would not even change when the plant’s parameters are changed to simulate time-variant plant behaviour. If a low overshoot is required, though, the examined FL controller has a feasible behaviour.

5 Conclusion

Controllers – and different tuning methods – can be compared to each other by the basic criteria that are mandatory for every control system. All of the tested controllers showed stable behaviour, had good accuracy as measured by the resting control deviation, and could be considered robust, as all the controllers were able to satisfactorily control the plant, even when the parameters of the plant altered over time. The coherence of speed and attenuation of control loops is shown in this work again. The controllers which have a lower setting time, as a general rule, have a higher overshoot. Therefore, a trade-off has to be made when choosing the right controller for a control application. For the set-up used in this work, the ZN-tuned PID controller showed the fastest settling time, whereas the FL controller had the lowest overshoot.

It has to be said, though, that the behaviour of the FL controller highly depends on the chosen ruleset and membership functions, and a different characteristic for the step response can, therefore, be obtained with an FL controller. This is also true for the NN predictive controllers, where the chosen architecture of a controller, as well as the training data, influences the future control action. Therefore, these two certain types of controllers stand only prototypical for the respective control approaches, as no generalized methods of bestpractice design of these controllers exists so far.

It should be noted that for small control problems that can be linearized with sufficient accuracy, like the one examined in this work, neither a fuzzy controller nor a neural-network controller are of certain advantageous character. In all performance indices shown in Tables 5 and 6, the PID controller with a specific tuning method can keep up with more sophisticated control approaches. By choosing other tuning methods for a PID controller and manual fine tuning of the parameters, the shown behaviour can be changed if necessary. Especially when taking into account the lesser implementation expenses and the lower computational complexity of a PID controller, fuzzy and NN controllers cannot be considered practicable for such a control application.