1. Introduction
Most industrial processes are multivariable systems which often present strong interactions between the manipulated and the controlled variables. Here, the definition of a suitable control structure to regulate the system is not often trivial [
1], especially when dealing with multiple-objective problems and dynamics complexity. In this scenario, even though diverse strategies are possible [
2], Model Predictive Control (MPC) turned out to be among the most effective ones in fulfilling the aforementioned tasks [
3,
4,
5]. Studies found in the recent literature exploit algorithms based on MPC methods applied to several process, in which online optimization problems are involved [
6,
7,
8,
9,
10]. However, it is well known that MPC is more challenging than other control strategies [
11,
12]. The challenges and differences arise from the following main aspects:
The control action must be calculated in a receding horizon manner. MPC solves an optimal control problem at each sampling instant, where a sequence of control moves are optimized and only the first control move is injected into the system [
13]. This process is repeated, which translate into a greater computational demand on control platforms [
14].
MPC has been known as powerful tool to deal with system constraints [
15].This control strategy addresses the state constraints and input saturations to obtain the manipulation that minimizes the proposed cost funcion [
16]. Here, heavy execution load and communication resources are needed [
17].
Use of weighting matrices in the cost function. In MPC approaches the value of the pondering matrices are set a priori, to penalize the large excursion of the tracking error and the deviation of the manipulation. This, to obtain the control action; thus, the optimization process that derives the best results can not usually sustain a low stable computation time [
18].
Henceforth, these aspects limits the algorithms that can be used to solve the MPC strategy and has motivated the search for computationally efficient optimization algorithms for practical applications where the sampling period tends to be short [
12]. In addition, embedded systems are a powerful tool in industrial implementations. In contrast to personal computer applications, they address low computational resources, but provides portability, low cost and low jitter because of the reduction of software interruptions from the operative systems. Thus; MPC is desirable for embedded applications with fast control cycles, such as bioengineering, aerospace, automotive, etc. These embedded applications require small and power-efficient controllers, capable to solve optimization problems at high sampling rates [
19]. The first embedded implementation of an MPC algorithm is reported in [
20], which consists of a constrained control strategy for a single-input single-output (SISO) system on a Field-Programmable Gate Array (FPGA). Nowadays, research efforts are focused on the development of embedded MPC implementations with low latency. Nevertheless, the computation complexity makes the multivariable MPC poorly efficient for high speed applications where the controller iteration must be executed in a few milliseconds or even in microseconds.
For this reason, recent research works address the computational load by software or hardware improvement. In [
21], for multivariable processes, a relaxed performance index with the constraints implicitly defined in the weighting matrices is developed, which contributes to reduce the execution time. Moreover, in [
22], the online latency is reduced, by converting the quadratic programming problem into an equivalent nonnegative lest-squares problem. On the other hand, in [
23,
24,
25], the authors implement a constrained MIMO MPC on high resources processors of 1.6 GHz, 2.2 GHz and 1.25 GHz respectively. These implementations reach low latency due to the amount of resources on their embedded devices. However, the processors are not affordable. Furthermore, in [
9], a constrained MIMO MPC is well implemented on a NI myRIO 677 MHz processor. Nevertheless, as it is mentioned, it is not recommended for fast applications. In [
26], an MPC algorithm is implemented on a microprocessor of 216 MHz reaching low latency, but constraints are not considered. Additionally, a constrained MIMO MPC is implemented on a microprocessor of 96 MHz in [
27], nevertheless, high latency is reported. In contrast to research efforts found in the literature, this work presents an embedded implementation of a constrained MIMO MPC algorithm (“Baseline”) and a new software-based optimization for the embedded control strategy (“Propose”). Thus, without affecting the tracking performance of the Baseline, the execution time and the processor usage are substantially reduced in the Propose. This makes the proposed software-based implementation mainly suitable for embedded control systems.
The paper is organized as follows.
Section 2 presents the constrained MIMO predictive control algorithm.
Section 3 describes the foundations of computational architecture used in this work.
Section 5 presents a computational analysis of the MIMO predictive control algorithm and the proposed software-based implementation. Additionally, a jet transport aircraft as study case and the selected embedded platform are presented.
Section 6 shows the performance, the execution time and the processor usage, of both implementations: the Baseline and the Propose. Finally,
Section 7 discusses the conclusions.
2. Model Predictive Control Algorithm
This section presents a brief review of the MIMO predictive control algorithm. This MPC is based on discrete-time state space model, and it is proposed by Wang in [
10]. In this previous work, considering the predictions of the states, the control action is obtained through the solution of a constrained optimization problem by using a cost function with a weighting matrix. At each sampling time, an optimal control problem is solved which demands high computational resource usage. The system dynamics is denoted by the discrete time Linear Time Invariant (LTI) State-Space Model taking the following structure:
where
is the state vector,
is the controlled input vector,
is the output vector,
is the state matrix,
is called the input matrix,
is called the output matrix and
denotes the sampling instant number.
The MPC strategy uses the Velocity Form Model (VFM) as offset-free method [
10,
28,
29,
30]. The VFM method is based on an augmented State-Space Model. Hence, from (
1),
where
,
,
and
, the VFM takes the following structure:
where
and
is the new state vector:
As in [
10], the state predictions for the consecutive sampling instants are:
where
stands for prediction horizon and
corresponds to control horizon. Then, from (
3) and (
6), the predicted outputs can be formulated using the following vector-matrix notation:
where
and
is the whole predicted outputs of
, and
concatenates the future control trajectory of
:
The definition of the cost function is one of the key elements in MPC strategy to define the desired system behavior [
11,
12]. The cost function
used to find the best sequence of control action over the prediction horizon
is defined as follows:
where, the first element considers the error
between the whole predicted outputs denoted by
and the reference
of the vector
. Furthermore, as in [
31], the second term stands to penalize the rate excursion of the control vector; here, the weighting matrix
represents a direct influence on the performance of the system [
11]. Hence, when a low pondering matrix
value is used, the first element of the cost function is interpreted as the primary situation to be minimized. The reference
vector is expressed as follows:
Substituting (
7) in the first element of (
10), the cost function is expressed in state-space representation:
Thus, to obtain the control law, the performance index (
12) is rewritten in the following compact form:
where
subject to the following inequality constraints:
where
then,
is a matrix reflecting the constraints, and
contains the maximum and minimum values allowed in
u,
, and
y. Moreover,
is a identity matrix, additionally
is a lower triangular matrix and
is a vector-matrix whose elements are
.
As in [
32], the sequence of the future actions
cannot be freely chosen in
. The constraints have to be taken into account giving the following optimization problem
:
The cost function is minimized considering the constraints arranged in , and the first action of the best sequence control action is used. Nevertheless, solving the optimization problem of the baseline algorithm involves a high number of decision variables and high number of constraints which demands high computational resources.
6. Results
The present work and the baseline algorithm VFM in [
10] are developed using the same computational platform for the study cases described in
Section 4. These implementations are analyzed considering: the speedup and the processor performance.
The speedup factor is described using (
20).
where
is the latency of the reference algorithm, and
is the latency of the proposed algorithm. On the other hand, the processor performance is evaluated considering the processor usage.
6.1. Study Case 1—Results
Considering a prediction horizon
,
and a
, the simulation results are shown in
Figure 8, the controlled variable, the manipulated variables, and the incremental variable are plotted for both: the present work and the baseline algorithm.
Both implementations execute 1000 iterations, and a profile analysis is executed. The results from the profile analysis is shown in
Table 6.
First, an enhancement is obtained by the implementation of the improvements to the Hildreth’s Algorithm. This reduces its latency from
to
. Reducing the execution time by 1064
. Then, the strategy of pipelining is implemented making an additional reduction of 1037
. Thus, the total execution time is reduced 2101
. Additionally, the speedup factor is calculated according to the execution times average presented in
Table 6. Here, the speedup factor is
, (
by the Hildreth’s modification and
by the pipeline implementation).
Furthermore, considering that both implementations are run in multicore execution, the processor utilization is evaluated,
Table 7.
As it can be seen, with the present research work, the processor usage was released for CPU 0 (from to ) and for CPU 1 (from to ).
6.2. Study Case 2—Results
Considering a prediction horizon
,
and a
, the simulation results are shown in
Figure 9, the controlled variable, the manipulated variables, and the incremental variable are plotted for both: the present work and the baseline algorithm.
Both implementations execute 1000 iterations, and a profile analysis is executed. The results from the profile analysis is shown in
Table 8.
According to the implementation of the modified Hildreth’s Algorithm, latency is considerably reduced from 3491
to 394
. Thus, the execution time is reduced 3097
. Additionally, when the strategy of pipelining is implemented making an additional reduction of
. Thus, the total execution time is reduced 4011
. Additionally, the speedup factor is calculated according to the execution times average presented in
Table 8. Here, the speedup factor is
, (
by the Hildreth’s modification and
by the pipeline implementation).
Furthermore, considering that both implementations are run in multicore execution, the processor utilization is evaluated,
Table 9.
As it can be seen, with the present research work, the processor usage was released for CPU 0 (from to ) and for CPU 1 (from to ).
7. Conclusions
This paper proposes a new software-based implementation for a constrained Multi-Input-Multi-Output predictive control algorithm embedded in the NI myRIO 1900 using NI LabVIEW Real-Time Module. Based on the computer architecture concepts, a software-based implementation is proposed. Thus, as an evaluation case, the proposed implementation is used to control a jet transport aircraft during cruise flight.
Experimental results shows that the new software-based implementation has a good performance regardless the computational modification effected. Additionally, compared with the baseline algorithm implementations, there is a significant improvement on the execution time without affecting the tracking performance for both study cases. The proposed software-based implementation reaches a speedup factor up to for the jet transport aircraft and for the tape transport system with respect to the baseline implementation. In addition, the processor usage was released for both study cases, and in CPU 0 and and in CPU 1, respectively. Thus, the obtained results do benefit the implementation of MIMO MPC techniques by reducing the execution time and the computational load.