Virtual internal model tuning for cascade control systems

ABSTRACT Cascade control is used in many practical applications. To realize the desired specification of the cascade control systems, accurate mathematical models of the plant are not only inner but also outer loops required. However, there are also many situations where it is difficult to execute ideal experiments for obtaining mathematical models for practical reasons. In such situations, it is expected that the direct usage of the data for control design enables us to obtain desired controllers. From these backgrounds, we propose a controller tuning method for the two controllers in a cascade control system. Here, we apply virtual internal model tuning proposed by the authors to update the cascade control system. In this proposed method, specifications of the inner and the outer loops can be set independently. The optimal parameters of the controller in each loop can be obtained using the least square method. Finally, the validity and usefulness of the proposed method are illustrated using experiments.


Introduction
The cascade control system [1] is used in various practical applications, such as in chemical plants and motor control.The typical block diagram of the cascade control system is shown in Figure 1, where the dark grey box with a broken line is the inner loop, whereas the light grey box is the outer loop.Using these two controllers, the behaviour of the inner and outer loops can be designed separately.Particularly, by considering the control target as a cascade coupling, the control system can be designed to easily improve the control performance.By designing the characteristics of the inner loop to move faster than those of the outer loop, a better control performance can be obtained, which is difficult to design using a single controller.
Recently, several approaches to control system design with direct utilization of data without the mathematical model of a plant have been proposed and studied.These approaches are referred to as data-driven control, such as Iterative Feedback Tuning (IFT) in [2], Virtual Reference Iterative Tuning (VRFT) in [3], Fictitious Iterative Reference Tuning (FRIT) in [4].VRFT and FRIT have practical advantages because they require only one-shot experimental data for offline optimization, whereas IFT requires many experiments.The authors have recently proposed a novel controller parameter tuning using only output data for a conventional feedback control system.This method is referred to as Virtual Internal Model Tuning (VIMT) in [5].VIMT is a controller parameter tuning method that uses the output and the implemented initial controller instead of the input signal.We compare VIMT with other methods.FRIT includes the controller structure as an inverse direction in the cost function.Therefore, it requires nonlinear optimizations when only the numerator of the controller is parameterized, as in the case of a PID controller.VRFT includes the controller in the forward direction in the cost function; thus, the controller can be updated using linear optimization for PID controllers.However, VRFT assumes the use of a filter to enable computation because the original cost function is non-proper and the filter changes the tuning performance.VIMT outperforms FRIT and VRFT in terms of convenience in practical applications.
The reference [6][7][8] investigated on data-driven controller tuning for cascade control systems.In the VRFTbased method, the filters must be designed to calculate the cost function and the accuracy of the obtained parameter is degraded by the filter performance.FRIT requires the use of nonlinear optimization, which may cause the local optimum solution to converge.The optimization calculation method and filter design still have some shortcomings.Based on the aforementioned issues, the tuning cascade controller by VIMT is considered in this study.We propose a method that can independently tune the characteristics of the inner and outer loops.When using a controller with tunable parameters in the numerator, such as a PID controller, we propose that the two controllers can be obtained by linear optimization.
The remainder of this paper is arranged The remainder of this paper is arranged as follows: Section 2 presents the notation and problem setup; Section 3 explains the VIMT and Section 4 explains a VIMTbased tuning rule for cascade control systems; Section 5 presents the verification results using the cart system experimental equipment; finally, Section 6 summarizes the paper.

Notations
Let R n be the set of n-dimensional real column vectors and a represents the transpose for a ∈ R n .The value at time k in the discrete time signal w is denoted as w [k] .The vector of the signal between k = 0 and k = N is denoted as w [0,N] .Let z denote the shift operator defined as zw . The norm for this signal is defined as: The output of a system with a transfer function G regarding the input w should be denoted as the convolution form of the Markov parameter of G and w.However, we denote the output as Gw to enhance readability.The content of this research is discussed in discrete time; however, it can be discussed in continuous time as well.Moreover, discussions can be made using signals with a finite time span because G are linear timeinvariant systems.We denote the finite time output of G with the input signal w between k = 0 and k = k as Gw [0,k] .

Problem formulation
Consider a cascade control system shown in Figure 1.
Plants G 1 and G 2 are linear, time-invariant, finitedimensional, single-input, single-output, strictly proper, and minimum phase systems.Moreover, we assume that G 1 and G 2 are unknown, whereas their relative degrees are known.The inner and outer controllers C 1 and C 2 are described using tunable parameter vectors ρ 1 and ρ 2 , respectively.The two controllers are denoted as with a parameter vector . We define ρ := {ρ 1 , ρ 2 } as the parameter vector of each of the two controllers C 1 (ρ 1 ) and C 2 (ρ 2 ), respectively.We assume that C 1 (ρ 0 1 ) and C 2 (ρ 0 2 ) have no unstable zero.
The transfer function from the reference signal r to the output y(ρ) is denoted as: and the inner loop transfer function from u 2 to w is denoted as: Here, we provide a desired tracking reference model from r to the output y as T d .Thus, the desired output is described as Under these settings, the problem considered here is to find a controller parameter ρ := {ρ 1 , ρ 2 } such that y(ρ) follows the desired response y d := T d r without using models of G 1 and G 2 .

Virtual internal model tuning
In this section, we explain virtual internal model tuning for a controller in the conventional closed-loop system [5].Here, we consider a closed-loop system illustrated as Figure 2. In this figure, the feedback controller has some tunable parameters ρ and it is written as C(ρ).
A plant G is a single input, single output, linear time invariant, and minimum phase system.The reference signal is denoted as r.The output is written as y(ρ).
A transfer function from r to y(ρ) is denoted as T(ρ) which is written as: The objective of this control system is to ensure the output is close to a given desired output y d := T d r. y(ρ 0 ) is assumed as the initial output, which is obtained from the closed loop with the initial controller C(ρ 0 ) embedded with the initial parameter ρ 0 .Subsequently, we minimize To solve this problem, we express the output y(ρ) using the initial information This problem aims to place T(ρ) close to T d using tuning parameters.We assume that there exists a ρ * such that the system T(ρ * ) match to T d as After parameter tuning, we express G using T d and C(ρ * ) in Equation (9).Then, substituting G into Equation ( 8), the unknown desired output y(ρ) and the desired controller C(ρ * ) can be expressed as follows: without G.To obtain the unknown ρ * , we replace ρ * by ρ of Equation (10).Subsequently we rewrote y(ρ) as ỹ(ρ).We then minimize the cost function Finally, by implementing the optimal parameter

Virtual internal model tuning for the cascade system
In this section, we propose a tuning method using virtual internal model tuning for two controllers on the cascade control system in Figure 1.

Cost function
We assume that the output w(ρ 0 1 ) of the inner loop and the output y(ρ 0 1 ) of the outer loop are provided.Assume the desired specifications of the inner and outer loops are T d1 and T d2 , respectively.Here, we consider updating the parameters in two controllers independently to achieve the specification for each loop.This problem aims to place T 1 (ρ) and T 2 (ρ) close to T d1 and T d2 by tuning parameters, respectively.That is, after tuning the parameter, it can be assumed as Here, we assume that there exist T d1 and T d2 such that Equations ( 13) and ( 14) are completely satisfied.
In reality, such T d1 and T d2 cannot be set because G 1 and G 2 are unknown.Therefore, since the relative orders of G 1 and G 2 are known, we consider setting T d1 and T d2 to match the relative orders in Equations ( 13) and ( 14), respectively.In addition, if tracking to a step signal, for example, is considered as a tuning specification for both, a condition is added as appropriate so that T d2 (0) = 1 is satisfied.In the actual control target, mechanical limitations such as input conditions must be considered.Therefore, the time constant of the first-order delay system, for example, should not be overly tight, but should be determined within the range achievable by the target system.For this study, we consider the situation where appropriate tuning specifications are given.From Equation (13), G 1 can be written as From Equation ( 14), G 2 can be expressed as To achieve the desired output y d , we express the output y(ρ) using only the provided information; the output can be expressed using the inverse system of T 2 (ρ 0 ) as Using the relation y(ρ * ) can also be expressed as By substituting Equation (15) into G 1 in Equation ( 19), we obtain To obtain ρ * , we redefine the signal ỹ(ρ 1 ) [0,N] from Equation (21), by replacing ρ * with the tunable parameter ρ and determine a cost function as follows: To update C 2 , using the relation G −1 2 y(ρ 0 ) = w(ρ 0 ) and substituting it into Equation ( 16), we obtain However, Equation ( 23) cannot be calculated because the left side of Equation ( 23) may be non-proper.Thus, we multiply T d2 /(1 − T d2 ) on both sides.We then replace by ρ * 2 as a tunable parameter ρ 2 and define the cost function as Finally, we minimize J 1 (ρ 1 ) and J 2 (ρ 2 ) simultaneously.Consequently, we obtain the optimal ρ * 1 and ρ * 2 for the given specifications.

Algorithm
We summarize the algorithm of this propose method as follows.

Note
If the controller exhibits linear parameterization as PID controller expressed as Equations ( 22) and ( 24) can be solved using the least square method.Where T fi is a time constant of the approximate differentiator, T s is a sampling time, and the parameter vector is When C 1 and C 2 are denoted as Equations ( 25), ( 22) and ( 24) can be rewritten as (26) Here, V 1 , Z 1 , V 2 , Z 2 is denoted as: Finally, the parameter to minimize Equations ( 22) and ( 24) can be obtained as follows:

Experimental verification
In this section, we show the experimental result using the cart positioning system with a DC motor 1 as shown in Figure 3.The cart on the linear rail is connected to a DC motor and a positioning sensor to a belt.The position of the cart is measured using a position sensor and the value is sent to a PC through a digital signal processor (DSP) board.The control law is defined as in Figure 1.Here, we divided the cart system into an integral part and a first-order system.In this experimental equipment, the velocity of the cart cannot be measured directly.Therefore, we calculate the used velocity differential on the DSP.We set the sampling time as T s = 0.001 s.The output u 2 from C 2 denotes the reference signal of the velocity of the cart.The controller of the inner loop, C 1 (ρ 1 ) and that of the outer loop, C 2 (ρ 2 ) are PID controllers expressed as: respectively.Here, the initial parameters are expressed as follows: The reference signal denotes the step and ramp signals at a distance of 10 [cm].In this verification, there are two experiment used difference reference signal.there are (a) step signal and (b) ramp signal.

Case (a): the step signal
The specifications are expressed as: The experimental result with these initial parameters are illustrated as Figures 4 and 5.In Figure 4, the cart position y is denoted by the orange line and the desired output y d := T d2 r is denoted by the red line.
In Figure 5, the output of controller C 2 as the reference signal of the inner loop u 2 (ρ ini ) is denoted by the black line, the velocity of the cart as the output of the inner loop w(ρ ini ) is denoted by the orange dotted line,  and the desired output of the inner loop w d (ρ ini ) := T d1 u 1 (ρ ini ) is denoted by the red line.
The parameters of the controller in the cost functions are linear.Therefore, the optimal solution of each cost function can be determined using the least square method.Thus, the parameters are obtained as: The results of the experiment after parameter tuning, shown in Figures 6 and 7.In Figure 6, the cart position y is denoted by the green line and the desired output

Case (b): the ramp signal
The reference signal is defined as Moreover, the specifications are expressed as: Here, T d2 is determined to achieve tracking to ramp signal.When considering the tracking to the step and ramp signals, T d2 should be set so that T 2 satisfies lim s→0 s 1 s 2 − T d2 (s) This time, the adjustment parameter τ is used to set T d2 as Equation ( 47) is the discretization of Equation ( 50) with zero-order hold.
The experimental result with these initial parameters are illustrated as Figures 8 and 9.In Figures 8 and 9, Notations are the same as for Figures 4 and 5.
The parameters of the controller in the aforementioned cost functions are linear.Therefore, the optimal solution can be determined using the least square method.Thus, the parameters are obtained as: The results of the experiment after parameter tuning are shown in Figures 10 and 11.In Figures 10 and 11, Notations are the same as for Figures 6 and 7.

Discussion
First, we consider the result of the outer-loop characteristic.According to Figures 6 and 10, the output signal y(ρ * ) can be tracked to the desired output y d , respectively.Next, we consider the result of the inner-loop characteristic.Here, we set the same T d1 on both experiments, but each ρ * 2 has a liitle of difference.This difference is caused by the PE condition of each output and the observation noise.According to Figures 7 and  11, although they have some difference between each ρ * , the characteristics of the inner loop can achieve the desired output provided by Equation (40) because the output velocity can be tracked to the desired velocity respectively.
In this verification, the differentiator parameters of the inner loop are calculated as negative.This is due to the influence of the approximate differentiator and does not affect the stability of the control system as instability or unstable zeros.

Conclusion
In this study, we proposed a data-driven controller design for a cascade system.Two controllers can be tuned independently in this system using two cost functions.Furthermore, the optimal solution can be easily obtained using the least square method when the parameters of the controller are linear.This is because the internal model architecture is virtually used for controller tuning.The effect of the noise and the disturbance should be theoretically studied in the future.In addition, the application of this study to the class of unstable and non-minimum phase systems is also an important research direction.

Figure 1 .
Figure 1.The cascade control system.

Figure 3 .
Figure 3.The cart positioning system with a DC motor.(a) The figure of the system and (b) Overview of the system.

Figure 4 .
Figure 4. Comparison of the output of the cart positioning control.The output y(ρ ini ) as the cart position with the initial parameter ρ ini is denoted the orange line and the desired output y d is denoted red line.The reference signal is denoted by the black line.

Figure 5 .
Figure 5.Comparison of the input and output signals on the inner loop.The output w(ρ ini ) of the cart speed with the initial parameter is denoted by the orange line.u 2 (ρ ini ) is the reference signal for the inner loop as the reference speed.The desired speed output w d (ρ ini ) is denoted the red dotted line made by u 2 (ρ ini ).
y d := T d2 r is denoted by the red dotted line.In Figure5, the output of controller C 2 as the reference signal of the inner loop u 2 (ρ * ) is denoted by the black line, the velocity of the cart as the output of the inner loop w(ρ * ) is denoted by the green line, and the desired output of the inner loop w d (ρ ini ) := T d1 u 1 (ρ ini )is denoted by the red dotted line.

Figure 6 .
Figure 6.Comparison of the output position of the cart system between the desired output and the output with the tuned parameter using the proposed method.The output y(ρ * ) is denoted the green line and y d is denoted the red dotted line.The output signal after tuning is in line with the desired output by the proposed method.

Figure 7 .
Figure 7.Comparison of the output velocity of the cart system between the desired output and the output with the tuned parameter using the proposed method.The velocity output w(ρ * ) is denoted by the green line and the desired velocity w d (ρ * ) is denoted by the red dotted line.The velocity signal after tuning is in line with the desired velocity.

ρ * 1 =Figure 8 .
Figure 8.Comparison of the output of the cart positioning control.The output y(ρ ini ) as the cart position with the initial parameter ρ ini is denoted the orange line and the desired output y d is denoted red line.The reference signal is denoted by the black line.

Figure 9 .
Figure 9.Comparison of the input and output signals on the inner loop.The output w(ρ ini ) of the cart speed with the initial parameter is denoted by the orange line.u 2 (ρ ini ) is the reference signal for the inner loop as the reference speed.The desired speed output w d (ρ ini ) is denoted the red dotted line made by u 2 (ρ ini ).

Figure 10 .
Figure10.Comparison of the output position of the cart system between the desired output and the output with the tuned parameter using the proposed method.The output y(ρ * ) is denoted the green line and y d is denoted the red dotted line.The output signal after tuning is in line with the desired output by the proposed method.

Figure 11 .
Figure 11.Comparison of the output velocity of the cart system between the desired output and the output with the tuned parameter using the proposed method.The velocity output w(ρ * )is denoted by the green line and the desired velocity w d (ρ * ) is denoted the red dotted line.The velocity signal after tuning is in line the desired velocity.