Data-driven Process Control – Part 2: Modelling System Behaviour

After the first article in this series dealt with the general basic building blocks of control systems, the second article is dedicated to modeling the behavior of systems. The focus here is on differentiating between different types of modeling. The main part of the article introduces a special data-driven approach that has recently attracted growing scientific interest.

Knowledge of the system behaviour, i.e. knowledge of the quantitative change in output when the system’s inputs change, is a basic prerequisite for system control. This knowledge is represented by behavioural models, the development of which we will examine in more detail in this section.

A physical example system

As a simple physical example, let’s look at what is known as an ideal planar pendulum. The pendulum mass is assumed to be point-like and suspended on a massless cord; all frictional forces are disregarded. The only force acting on the mass is the gravitational force of the Earth (see Figure 3).

Figure 3: The ideal pendulum

We will use this example to describe three basic types of modelling.

Whitebox Modelling

In this type of modelling, the system behaviour is represented by differential equations whose parameters are completely known. The approach is highly application-specific and requires a high degree of detailed knowledge of the system under consideration. The complexity of real-life systems obviously places limits on the application of this approach. In addition, the strategy is difficult to automate and the models ob

We will use this example to describe three basic types of modelling.tained are difficult to adapt to changing requirements.

Example – white box modelling of the pendulum system

The starting point is Newton’s second law F = m \, a and Newton’s law of gravitation, specifically for bodies near the Earth’s surface F = m \, g \, [\, 0, -1 \,]^T. In terms of the motion of the pendulum, only the force F_T acting tangentially on the pendulum mass is to be considered, since the radial component is compensated by the cord. For the same reason, only the tangential acceleration a_T is relevant. Using the time-dependent deflection angle \theta(t) and the angular acceleration \ddot{\theta}(t) (see Figure 3), the variables F_T and a_T are given as   

    \[F_T = -m \ g \sin \theta(t) \quad \text{and} \quad a_T(t) = l \, \ddot{\theta}(t)\]

with the length l of the pendulum cord and g \approx 9.81 \frac{m}{s^2} as the gravitational acceleration on Earth. Therefore, m \ a_T = F_T results in the following differential equation for the deflection angle \theta

    \[\ddot{\theta} (t) = - \frac{g}{l} \ \sin \theta(t)\]

If we additionally assume that the angle \theta is small, we obtain as a further simplification

    \[\ddot{\theta} (t) = - \frac{g}{l} \ \theta(t)\]

This differential equation can be used to predict the behaviour of the pendulum for any initial angle \theta_0 \ll 1 and any initial velocity \dot{\theta}_0.

Grey- and Blackbox Modelling

This modelling approach also results in differential or difference equations, which, however, only specify the basic structure of the system and therefore contain free parameters. If the system model incorporates prior knowledge, for example in the form of physical principles, then it is a grey box model. Otherwise it is referred to as a black box model.

The free parameters of the model are determined from observed data of the system during an adaptation step, whereby this step of the modelling can be automated to a large extent. The choice of model structure, however, is critical for the quality of the model, requires a high degree of experience due to its complexity and can therefore only be automated to a limited degree. Moreover, in contrast to the white box approach, grey and black box modelling can be applied to systems of any complexity.

Data-Based Modelling

This new approach has been attracting an increasing amount of attention for some years now. The starting point is the notion of identifying a system solely on the basis of its externally verifiable behaviour. A detailed description of the systems-theoretical background for this approach can be found in [1]. With the increasing availability of process data from technical systems, the view of this data-driven approach has changed. It was recognized that the description of system behavior based purely on observations opened the door to new models and algorithms (see [2] and [3]). This transition is comparable to developments in the application of neural networks in recent years.

Since it is an unsupervised learning procedure for non-parametric system representations, no model of the system is constructed, unlike in white, grey and black box modelling. As such, the applicability of this approach is not subject to complexity-related limitations, nor does the need for a structural decision prevent it from being automated. That said, the approach is initially limited to so-called linear and time-invariant systems (see “Mathematical background”).

Example – Data-based modelling of the pendulum system

To arrive at a data-based representation for the pendulum system, we only need to conduct two experiments. Using the notation x(t) = [\, \theta(t), \dot{\theta}(t) \, ]^T with the deflection angle \theta(t) and the angular velocity \dot{\theta}(t), the initial conditions for the two experiments can be taken as

    \[x_1(0) = \begin{bmatrix} 1 \\ 0 \\ \end{bmatrix} \quad \text{and} \quad x_2(0) = \begin{bmatrix} 0 \\ 1 \\ \end{bmatrix}\]

The first experiment records the motion x_1(t) of the pendulum at the starting angle 1^{\circ} and vanishing starting velocity at discrete points in time \{ t_i \}_{i=1}^n. The second experiment uses the inverse setting for recording x_2(t).

The recordings of both experiments can then be used to calculate any other pendulum motion x(t) at the initial conditions x(0) = [\, \theta_0, \dot{\theta}_0 \,]^T by means of the relationship

    \[x(t) = \theta_0 \ x_1(t) + \dot{\theta}_0 \ x_2(t)\]

at the points in time \{ t_i \}_{i=1}^n, whereby the linear independence of the vectors of the two initial conditions is essential. Further we obtain the compact representation

    \[B \, x(0) = x \quad \text{with} \quad B = \begin{bmatrix} x_1(t_1) & x_2(t_1) \\ \vdots & \vdots \\ x_1(t_n) & x_2(t_n) \end{bmatrix} \quad \text{and} \quad x = \begin{bmatrix} x(t_1) \\ \vdots \\ x(t_n) \end{bmatrix}\]

We call the matrix B an algebraic representation of the pendulum behavior.

The objective of reconstructing the entire system behaviour from observed data alone raises three main questions:

  • What data is suitable for behavioural representation?
  • How can this suitability be verified?
  • What is the scope of the collected data?

The mathematical theory provides clear answers to these questions (see “Mathematical background”). At this point, we will limit ourselves to stating that the collected data must have a level of independence that is precisely mathematically defined (see Example – Data-based modelling of the pendulum system). Such data can only be obtained by systematically stimulating the system, as physical systems naturally tend to transition into a state of equilibrium after some time in the absence of disturbances.

The necessary course of action is therefore to stimulate the system by means of random inputs during the observation period, thereby inducing the most diverse output behaviour possible (see Figure 4). It should be noted that this system stimulation must be carried out in compliance with the technical boundary and limit conditions of the system in order to avoid destabilisation with potentially serious consequences.

Figure 4: Random inputs for exploring system behaviour

At regular intervals, a dimensional criterion is used to check whether the collected data already encompasses all of the possible system responses. This check requires the desired or presumed system complexity to be specified (see “Mathematical background”), which includes the possibility of limiting it to a desired level. If the amount of data collected up to that point does not yet have the required complexity, random input data is generated again and the experiment is repeated.

As a result of this procedure, a system representation is generated from the observed data collected. In addition to being able to dynamically adapt the complexity of the system representation, the decisive advantage of this procedure is that the process described can be fully automated and therefore repeated autonomously if required.

The representation of the system behaviour obtained can now be used to make predictions about the system behaviour in the same way as the procedure outlined in the example “Data-based modelling of the pendulum system”. An example of how the method is used for quadcopter position control can be found in [4].

Mathematical background

The process under consideration is described as a linear and time-invariant dynamic system S, which has m input parameters, p output variables and n internal states and satisfies a difference equation of the form

    \[\begin{aligned} x(k+1) &= A \, x(k) + B \, u(k) \\[0.5em] y(k) &= C \, x(k) + D \, u(k) \end{aligned}\]

with x(k) \in \mathbb{R}^n, u(k) \in \mathbb{R}^m, and y(k) \in \mathbb{R}^p.

The behaviour B of the system is defined as the set of all trajectories w = (u, y), the time-restricted version B_L, consisting of trajectories of length L, is identified with a finite-dimensional vector space of the dimension

    \[\dim B_L = m L + n.\]

Through observation and excitation of the system S, a matrix H_L is formed as part of the identification process, the columns of which correspond to trajectories of length L. Knowing the dimension of B_L  allows to check whether the columns of H_L already collected span a sufficiently high-dimensional subspace before deciding to stop data acquisition.

The number n of internal states of the system S is regarded as a complexity measure for the system to be identified, and can be used to limit the complexity of the empirically determined system representation H_L of B_L in order to adapt the accuracy of the approximation to the requirements.

Having familiarised ourselves with the development of system models, especially for the purely data-driven case, we will now turn to the topic of control in the following section. The focus will be on a strategy that is particularly suited to control highly complex systems, i.e. systems with a large number of intervention and target variables.

Sources

[1] Jan C. Willems, “Paradigms and puzzles in the theory of dynamical systems”, IEEE Transactions on Automatic Control, 1991

[2] Ivan Markovsky, Linbin Huang, and Florian Dörfler, “Data driven control based on the behavioral approach – from theory to applications in power systems”, IEEE Control Systems, 2022

[3] Ivan Markovsky and Florian Dörfler, “Behavioral systems theory in data-driven analysis, signal processing, and control”, Annual Reviews in Control, 2021

[4] Ezzat Elokda, Jeremy Coulson, Paul N. Beuchat, John Lygeros, and Florian Dörfler, “Data-enabled predictive control for quadcopters”, International Journal of Robust and Nonlinear Control, 2021

This post was written by: