Direct Data-Driven Control for Cascade Control System

This paper combines system identiﬁcation, direct data-driven control, and optimization algorithm to design two controllers for one cascade control system, that is, the inner controller and the outer controller. More speciﬁcally, when these two controllers in the cascade control system are parameterized by two unknown parameter vectors, respectively, the problem of controller design is changed to parameter identiﬁcation. To avoid the modeling process for the unknown plants in the cascade control system, a direct data-driven control scheme is proposed to identify those two parameter vectors through minimizing two optimization problems, which do not need any knowledge of the unknown plants. Furthermore, the detailed ﬁrst-order gradient algorithm is applied to solve our constructed optimization problems, and its convergence property is also analyzed. To extend the above idea to design a nonlinear controller in the cascade control system, a direct data-driven scheme is proposed to get one optimal nonlinear controller, by using some spectral knowledge. Finally, one simulation example of ﬂight simulation is used to prove the eﬃciency of our proposed direct data-driven control for the cascade control system.


Introduction
e main mission of advanced control theory is to design a detailed controller in an open-loop or closed-loop structure so that this designed controller can drive the output of a plant to track an expected set point or to satisfy a given target. Two categories exist for controller design, that is, the model-based approach and the data-driven approach. Considering the first model-based approach, a mathematical model of the considered plant is required for the next controller design. It tells that no mathematical model means no controller. Constructing the corresponding mathematical model for the unknown plant is very necessary for this first type of model-based approach, and it is also the most difficult step, as it needs some knowledge of other subjects, such as probability theory and linear and nonlinear system theory. is modeling process corresponds to model identification or system identification, which is adopted to obtain the mathematical model exploiting measured data from the experiment on the considered open-loop or closedloop system. e whole steps for system identification include four main steps, namely, model structure selection, optimal input design, parameter estimation, and model validation.
ese four steps are implemented iteratively until getting one satisfying model, so system identification is the first step or premise for the next controller design, that is, the idea of identification for control.
Usually, trying to apply different system identification strategies to produce a mathematical model, this mathematical model may be high order and high property of nonlinearity; then, it leads to controllers with high order and high nonlinearity. us, due to the controllers with high nonlinearity, one extra controller reduction procedure is added in the practical application, because the complex controllers are difficult or costly to design and implement. Generally, the obtained controller, designed by the modelbased approach, depends on the identified model for the unknown plant. It means the above four identification processes are repeated again and again while guaranteeing that the identified model can be used to replace the original plant perfectly.
To alleviate the dependence on the identified model for the controller, the notion of the data-driven approach is widely studied in recent years. e attracting property of the data-driven approach is that the controller is designed directly based on measured data. As the data-driven approach is still in its infancy, different names are given in the references to describe it, such as data-driven, data-based, model-free. To the best of our knowledge, the principles between the data-driven approach and system identification are similar to each other, as the measured data are applied to get the mathematical model for the unknown plant in the framework of system identification, but they get the approximated controller for the case of the data-driven approach.
e idea of direct data-driven control was first proposed in machine learning; then, it attracted many researchers in the advanced control field recently. Now, this data-driven theory is widely applied in the control field, for example, direct data-driven control, data-driven estimation, data-driven detection, data-driven optimization, and so on. e common property among them is that the measured data are used to achieve our main goals; then, it means some useful information is extracted from these measured data. On the other hand, the data-driven approach needs lots of measured data; that is, the number of measured data is sufficiently large.
is requirement is feasible in our information period, and the data-driven approach was born to overcome the limitation of the model-based approach, so the data-driven approach is studied very popularly from theory and practice application.
Due to the application of the data-driven approach widely in the control field and the similar point between the data-driven approach and system identification, we call their combination as identification for control, that is, system identification for direct data-driven control. More specifically, we describe a concise introduction or contribution on system identification for direct data-driven control, which belongs to the data-driven approach. In case of the unknown but bounded noise, one bounded error identification is proposed to identify the unknown systems with timevarying parameters. en, one feasible parameter set is constructed to include the unknown parameter with a given probability level. In [1], the feasible parameter set is replaced by one confidence interval, as this confidence interval can accurately describe the actual probability that the future predictor will fall into the constructed confidence interval. e problem about how to construct this confidence interval is solved by a linear approximation/programming approach [2], which can identify the unknown parameter only for the linear regression model. According to the obtained feasible parameter set or confidence interval, the midpoint or center can be deemed as the final parameter estimation; further, a unified framework for solving the center of the confidence interval is modified to satisfy the robustness. is robustness corresponds to other external noises, such as outlier, unmeasured disturbance [3]. e above-mentioned identification strategy, used to construct one set or interval for an unknown parameter, is called the set membership identification, dealing with the unknown but bounded noise.
ere are two kinds of descriptions of external noise: one is the probabilistic description and the other is the deterministic description, corresponding to the unknown but bounded noise [4]. For the probabilistic description of external noise, the noise is always assumed to be one white noise, and its probabilistic density function (PDF) is known in advance. On the contrary for deterministic description on external noise, the only information about noise is bound, so this deterministic description can relax the strict assumption on the probabilistic description. In reality or practice, bounded noise is more common than white noise. Within the deterministic description of external noise, set membership identification is adjusted to design controllers with two degrees of freedom [5]; it corresponds to direct datadriven control or set membership control. Set membership control is applied to design feedback control in a closed-loop system with a nonlinear system in [6], where the considered system is identified by set membership identification, and the obtained system parameter will be a benefit for the prediction output. After substituting the obtained system parameter into the prediction output to construct one cost function, [7] takes the derivative of the above cost function with respect to control input to achieve one optimal input. Set membership identification can be not only applied in MC, but also in stochastic adaptive control [8], where a learning theory-kernel is introduced to achieve the approximation for nonlinear function or system. Based on the bounded noise, many parameters are also included in known intervals in prior; then, robust optimal control with adjustable uncertainty sets is studied in [9], where robust optimization is introduced to consider uncertain noise and uncertain parameters simultaneously. To solve the expectation operation with dependence on the uncertainty, the sample size of random convex programs is considered to replace the expectation by finite sum [10]. Generally, many practical problems in systems and control, such as controller synthesis and state estimation, are often formulated as optimization problems [11]. In many cases, the cost function incorporates variables that are used to model uncertainty, in addition to optimization variables, and [12] employs the uncertainty described as probabilistic variables. Reference [13] studied the data-driven output feedback controllers for the nonlinear system and applied event-triggered mode to analyze the robust stability. Data-driven estimation is used to achieve hybrid system identification [14], whose nonlinearity is described by one kernel function. During these recent years, the first author studied this direct data-driven control too, for example, the closed relation between system identification and direct data-driven control [15], and datadriven model predictive control [16]. Based on the above descriptions on direct data-driven control and our existing research about system identification, model predictive control, direct data-driven control, convex optimization theory, and so forth, our mission in this paper is to combine our previous results and apply them in practical engineering.
Here, in this paper, we continue to do some research on the direct data-driven control from theory and its application. Based on our previous results on direct data-driven control for a one-closed-loop system, we see that there exist multiple-closed-loop system in real engineering, for example, flight simulation, UAV flight control, robot control, and target tracking. Although the existing results on control and identification for one single closed loop can be used in this multiple-closed-loop system, some adaptations must be needed to satisfy this special system, and no detailed direct data-driven control exists for it. As the multiple-closed-loop system is one extended case for the two-closed-loop system, it is necessary to consider the control problem for this twoclosed-loop system. is two-closed-loop system has other names, such as dual control system or cascade control system; then, the cascade control system is adopted during this whole system. As two closed loops exist in the cascade control system, they correspond to one inner loop and the other outer loop. Under these circumstances, two controllers are unknown and needed to devise. In order to design these two unknown controllers, that is, the inner controller and outer controller, firstly the data-driven approach is applied to tune controllers with their parameterized structures. Indeed, in the most practical case of parameterized controllers, the problem of controller design is changed into one identification problem, corresponding to the unknown controller parameter. Generally, when the inner controller and outer controller are parameterized by two unknown parameter vectors respectively, for example PID, the datadriven approach is applied to design these two unknown parameter vectors. After substituting these two parameter vectors into their own forms, then those two controllers are obtained. During the detailed derivation process about direct data-driven control for cascade control system, two optimization problems are solved to get those unknown parameter vectors. Furthermore, one single and easy optimization algorithm-first-order gradient algorithm-is introduced to solve our constructed optimization problems, and the property of the first-order gradient algorithm is described to complete the analysis for optimization algorithm. e above descriptions about our mission on direct data-driven control for cascade control system hold in case of the parameterized controller; that is, data-driven approach is used to tune the parameter vector. Secondly, we also give some suggestions on the direct data-driven control for nonlinear controller. To deal with this complex problem without any controller parameter, we also think how to use the measured data to design the nonlinear controller directly. To the best of our knowledge, theory must serve for practical engineering, so from a practical point of view, our mentioned direct data-driven control for cascade control system is applied to control the flight simulation, whose mission is to track one given target, for example, UAV, plane, and ship. To be convenient to understand our flight simulation, its background and controller structure are explained in detail, and the most important aspect is that the cascade control system exists in the control structure for flight simulation.
Generally, the main contributions of the paper are formulated as follows: (1) It combines some different subjects, such as system identification, direct data-driven control, and optimization theory into one real practical engineering.
(2) e detailed processes for controller design are given for parameterized controller and nonlinear controller simultaneously. (3) It paves a road to identification for control. is paper is organized as follows: in Section 2, a cascade control system with two parameterized controllers is considered, and some preliminaries and physical variables are formulated, such as measured data, inner loop, and outer loop. In Section 3, a direct data-driven control scheme is proposed to design the inner controller and outer controller, existing in the cascade control system simultaneously. e control design process is changed to two mathematical optimization problems, whose decision variables correspond to those unknown parameter vectors. en, the first-order gradient algorithm is used to solve our constructed optimization problems, and the property of this first-order gradient algorithm is analyzed too. In Section 4, direct datadriven control for two parameterized controllers is extended to direct data-driven control for the nonlinear controller, which is applied to replace the formal parameterized controller. To testify our proposed direct data-driven control for the cascade control system, one example of flight simulation is used in Section 5, where the background and the detailed control structure of flight simulation are also described to understand easily. Section 6 ends the paper with a final conclusion and points out the next subject of ongoing research. By the way, here, all the mathematical derivations in this paper are obtained through our own contributions.

Cascade Control System
Consider one cascade control system in Figure 1, where two closed loops are shown without loss of generality and a noiseless environment being given.
In Figure 1, G(q) is the unknown plant in the inner loop and G ′ (q) is the unknown plant in the outer loop. Two families of linear proper controllers C i (θ i ) � C i (q, θ i ), θ i ∈ R n i } and C 0 (θ 0 ) � C 0 (q, θ 0 ), θ 0 ∈ R n 0 exist in the inner loop and outer loop, respectively. For convenience, the dimensions for parameter vectors θ i and θ 0 are all sent to be n. If they are not the same, then some extra elements are chosen to be zero.
ese two controllers C i (q, θ i ) and C 0 (q, θ 0 ) are parameterized by parameter vectors θ i and θ 0 , respectively, that is, is the output of the inner loop, y 0 (t) is the output of the outer loop, and N is the amount of measured data. e i (t) is the input signal for the inner controller, e 0 (t) is the input signal for the outer controller, the output for the outer controller is r i (t), and r 0 (t) is the input signal for this whole cascade control system.

Comment.
e inner controller C i (q, θ i ) and outer controller C 0 (q, θ 0 ) are related to their parameter vectors θ i and θ 0 , that is, two linear affine forms, such as the following special forms: Observing Figure 1 again, two reference models M i (q) and M 0 (q) are given for the inner loop and outer loop, respectively, and q is the backward shift operator. Two reference signals corresponding to the inner loop and outer loop are r i (t) and r 0 (t). ose two reference models M i (q) and M 0 (q) are all prior known, so they satisfy Due to the inverse property for two reference models M i (q) and M 0 (q), two reference signals r i (t) and r 0 (t) are In that cascade control system (Figure 1), two reference models M i (q) and M 0 (q) are given, and set of data D N � u(t), y i (t), y 0 (t) N t�1 with u(t) being measured by some sensors; the problem is to design those two parameterized controllers C i (q, θ i ), C 0 (q, θ 0 ) , while guaranteeing equation (1) holds in case of two unknown plants G(q) and G ′ (q).

Direct Date-Driven Control Scheme
To design those two parameterized controllers C i (q, θ i ), C 0 (q, θ 0 ) , existing in the inner loop and outer loop, respectively, we notice there are two unknown plants G(q) and G ′ (q). In the classical model-based control scheme, time is spent in identifying G(q) and G ′ (q); then the identified models are used for the next controller design. Furthermore, as two parameterized controllers C i (q, θ i ), C 0 (q, θ 0 )} are parameterized by vectors θ i and θ 0 , to avoid the complex modeling process for unknown plants G(q) and G ′ (q), a direct data-driven control scheme is proposed to achieve our goal. Figure 1, we have

Inner Controller. Firstly considering the inner loop in
where the first equation in (5) is the expected relation, and the second equation is the real relation between the input and output of the inner loop. Formulating equation (5) again, it holds that Comparing equations (5) and (6) and using the reference model M i (q), then transfer function from r i (t) to y i (t) must be equal to its reference model, through tuning the parameter vector θ i . It means parameter vector θ i is chosen to minimize the following mathematical optimization problem: where, in optimization problem (7), 2 is the common L2 norm. 3.1.1. Comment. When minimizing the optimization problem (7) to get parameter vector θ i , unknown plant G(q) is needed to identify firstly. is optimization problem (7) is not solvable without any knowledge about unknown plant G(q).
To avoid the appearance of unknown plant G(q) in the optimization problem, direct data-driven control is proposed here. Using the set of measured data u(t), y i (t) N t�1 , parameter vector θ i is extracted from the measured data u(t), y i (t) N t�1 , while avoiding the modeling process for unknown plant G(q). Observing the input signal and output signal for that unknown inner controller C i (q, θ i ), we have Substituting equations (4) into (8), we get where the input and output signals correspond to that measured data u(t), y i (t) N t�1 and no knowledge of unknown plant G(q) exists. en, we construct the following minimization problem for the inner controller C i (q, θ i ): where θ i is the parameter estimation of parameter vector θ i , measured data u(t), y i (t) N t�1 are collected during the whole experiment, and reference model M i (q) is given, so only parameter vector θ i is unknown in that cost function (10).
Because all variables are known in cost function (10), expect for unknown parameter vector θ i , parameter estimation θ i can be obtained through minimizing that optimization problem (10). e detailed optimization algorithm, used to minimize optimization problem, will be described in Section 3.3.

Outer Controller.
After minimizing that optimization problem (10) and substituting the parameter estimation θ i into the inner controller, we denote the designed inner controller as C i (q, θ i ). en, we turn to design the outer controller C 0 (q, θ 0 ) by the direct data-driven control scheme. Considering the outer loop and using the obtained inner controller C i (q, θ i ), it holds that that is, e minimization of the L2 norm of the modeling error is the same as the classical model reference controller; unknown parameter vector θ 0 is yielded by minimizing the following L2 norm: To avoid the modeling process for unknown plant G(q), G ′ , the direct data-driven controller scheme is proposed to identify the unknown parameter vector θ 0 . It is obvious that Construct the minimization problem for the outer controller C 0 (q, θ 0 ) during the framework of the direct datadriven control scheme, that is, where θ 0 denotes the parameter estimation for the outer controller C 0 (q, θ 0 ).

Mathematical Problems in Engineering
But, in optimization problem (15), variable r i (t) is unknown and unmeasured, so we need other relation to replace r i (t). Observing Figure 1 again, we have e i (t) � r i (t) − y i (t), u(t) � C i q, θ i e i (t). (16) en, Substituting equation (17) into that L2 norm (15), it holds that Combining two optimization problems for the direct data-driven control scheme, cost functions (10) and (18) depend on our set of measured data D N � u(t), { y i (t), y 0 (t)} N t�1 . Furthermore, the other two cost functions (7) and (13) are related to those unknown plants G(q), G ′ (q) , so they correspond to the model-based control scheme.

First-Order Gradient
Algorithm. Whatever for modelbased control scheme or direct data-driven control scheme, two optimization problems are needed to solve. e difference between the above two schemes is that whether the cost function is related to the unknown plant, it is necessary to study one fast and real-time algorithm to solve those two optimization problems. Consider only one optimization problem (10) for estimation of unknown parameter vector θ i again; for convenience, equation (10) is rewritten here again: For this unconstrain optimization problem, the parameter estimation θ i is easily solved by the commonly used Newton algorithm, that is, where θ k i means the parameter estimation at kth iterative and ∇ 2 J 1 (θ k i ) and ∇J 1 (θ k i ) are the Hessian matrix and gradient matrix at iteration θ k i . More precisely, their detailed forms show In case of linear parameterized controller, that is, Substituting equations (22) and (24) into (20), the Newton algorithm is yielded. e merit of the Newton algorithm is formulated as follows.
positive definite and the Hessian matrix ∇ 2 J 1 (θ i ) satisfies Lipschitz condition: en, the obtained sequence θ k i will converge to its optimal value θ * i . From the computation process for the Hessian matrix ∇ 2 J 1 (θ i ), square terms are needed. But the computation of this square term is difficult, so we use the first-order gradient algorithm to simplify the iterative value or avoid that Hessian matrix. Applying the first-order gradient algorithm to solve the above optimization problem, the scheme of the first-order gradient algorithm is as follows: Choose initial parameter vector θ 0 For all other step size rules, the rate of convergence of the first-order gradient algorithm remains the same as eorem 1.

Theorem 2. Assume the first-order gradient
and 0 < h < (2/L); L is one positive value. en, the first-order gradient algorithm generates the sequence θ k i such that Proof. Set en, where we use So, r k ≤ r 0 . further, we have erefore, us, Summarizing these inequalities, we have is completes the proof. Comparing the first-order gradient algorithm and Newton algorithm, the merit of the first-order gradient algorithm is that one step size is used to replace the Hessian matrix; then, the computation of the Hessian matrix is avoided while guaranteeing the convergence property. □

Suggestion for Nonlinear Controller Design
In Section 3, all results hold on the condition of parameterized controllers C i (q, θ i ), C 0 (q, θ 0 ) . is section gives one suggestion for nonlinear controller design in the framework of the direct data-driven control scheme. Without loss of generality, we only analyze the inner loop, as the analysis for the outer loop is the same as the other.
Replot that inner loop system in Figure 2.
In Figure 2, inner controller C i (q) is one nonlinear form, not still a parameterized form. From equation (10), the ideal case for that inner controller C i (q) satisfies that After multiplying both sides by u(t), it gives Take the expectation on both sides of equation (37) to get that is, where ϕ u (w) is the auto power spectral and ϕ y i ′ u (w) is the cross power spectral between y i ′ (t) and u(t). To expand both sides of equation (38), from Figure 2, we see

It means
Mathematical Problems in Engineering 7 (41) Apply the spectral theory to get where ϕ r i (w) is the auto power spectral for reference signal r i (t). en, using equation (36), we have Substituting equations (41) and (42) into (38), the nonlinear inner controller C i (q) is equal to Equation (43) tells that when the inner controller is one nonlinear form, its optimal form is equal to is one given reference model. us, the designed nonlinear controller is related to that unknown plant G(q), which can be identified by system identification.
Generally, from the above two sections, the direct datadriven control scheme can be applied to design two parameterized controllers, namely, the inner controller and router controller. On the contrary, for the case of the nonlinear inner controller and outer controller, direct datadriven estimation or identification is used to get the plants G(q), G ′ (q) ; then, nonlinear inner controller and outer controller are obtained easily by simple multiply operations.

Flight Simulation
In this section, we apply our proposed direct data-driven control for cascade control system into one control problem in flight simulation. To be convenient for understanding well, the basic knowledge about the control structure for flight simulation is introduced in Figure 3. e structure of the UAV simulation system includes a flight simulation with three degrees of freedom, a turntable control cabinet, a steering gear angle measuring device, and a simulation master console. Flight simulation realizes the azimuth axis motion simulation, and the pitch, roll, and heading attitudes are adjusted by the motion controller and fed back to the flight simulation computer. Flight simulation is a highprecision servo system. For an analogue flight simulation with a motor as a driving element, its essence is an electric position closed-loop control system. We can use negative feedback to improve the sensitivity of the system, and connect regulators in series in each closed loop, which can effectively reduce the sensitivity of the system to parameter changes. Usually, we design the motor control system as a three-loop structure: from the inside to the outside, the current loop (torque feedback), speed loop, and position loop. Among them, the current loop and the speed loop effectively improve the rigidity of the system and suppress the external disturbance of the system, and the position loop ensures the accuracy of the control system. According to the type of control law, the current loop and speed loop are generally controlled by PID and low-pass filter compensation. e control loop principle of each attitude angle is shown in Figure 4. e tracking of the UAV pitch angle signal by the threedegree-of-freedom motion simulation platform is realized by the actuator motor. e two screw rods and the middle single shaft support the load platform in a right-angled triangle manner, and when used as a moving cylinder to move forward and backward, the load platform can simulate the corresponding pitch angle. e pitch angle tracking loop realizes the automatic tracking of the UAV pitch angle. e platform pitch angle command comes from the simulation output of the UAV dynamic model, and the pitch angle feedback is obtained through the tilt angle sensor on the load platform. e principle block diagram of the pitch angle tracking loop is shown in Figure 5. e angle deviation is corrected by the pitch angle position loop corrector. e corrected signal is used as the actuator to execute the angular velocity of the motor. e speed feedback is the differential signal of the angular displacement of the motor. e three-point velocity method is used to calculate the differential signal. After the speed deviation is corrected, the torque motor is driven to rotate by the power amplification, and the actuator drives the load platform to move up and down under the drive of the torque motor to realize the accurate tracking of the UAV pitch angle signal. Based on each model in Figure 5, its corresponding mathematical model for pitch angle tracking loop is shown in Figure 6, where θ g is the pitch instruction or order, θ f is one feedback signal from sensor, w g is one given angular velocity signal, and u a1 is the armature voltage for servo motor. T f is interference torque, k pwm is power amplifier, G θ is one correction link for pitch angle tracking loop, and G w1 is also one correction link for servo motor speed loop.
Classical PID controller is used for this pitch angle tracking loop, that is, 8 Mathematical Problems in Engineering where [k p , k i , k d ] correspond to three PID controller parameters.
We regard motor and load as one whole part and collect the input signal and output signal with respect to this whole part. at expected reference model M i (q) is given as M i (q) � 0.921q 2 + 1.842q + 0.921 q 2 + 1.837q + 0.847 .
en, the complete design process is formulated as follows: Step 1. Before designing this PID controller or estimating these three unknown parameters k p , k i , k d , their initial values are chosen as 9.8, 3.0, 2.0 { }.

Conclusion
is paper connects system identification, direct datadriven, and optimization theory to study the direct datadriven control scheme for the cascade control system, which is more widely used in practical engineering. Due to the inner controller and outer controller existing in cascade control system simultaneously, the direct data-driven control scheme is proposed to design the inner controller and outer controller without any knowledge of the two unknown plants. We propose to design these two controllers not only for parameterized controller structure but also for nonlinear control in virtue of our considered direct data-driven control scheme. As this paper is one preliminary analysis in a noiseless environment, that is, no noise is considered through this paper, the direct data-driven control scheme for the cascade control system in a stochastic environment is our next ongoing work.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.