1 Introduction

Systems inversion, or output tracking, is a long-studied topic in control theory since the seminal work of Brockett and Mesarović [1], where the term reproducibility was used to denote it. Broadly speaking, it consists of finding, for a given system, the input that produces the desired output (thus justifying the name system inversion).

This technique is most often applied to systems already equipped with a feedback controller, which cares for stability and disturbance rejection, but need a better tracking in the transient phase, that makes a feed-forward action appropriate.

The systems inversion problem has been solved for linear SISO systems by Brockett [2], and since then it has been generalized to multivariable linear systems by several authors, e.g. Sain and Massey [3], and Silverman and Payne [4].

Motivated by practical problems in the control of flexible structures, the extension to multivariable nonlinear systems has been realized: see Hirschom’s paper [5] for the theoretical aspects, and Di Benedetto and Lucibello’s [6] for an application to the endpoint control of a flexible-arm manipulator. In the latter, the system under consideration is also time-varying.

More recently, the system inversion problem has been cast into an optimization frame; for example, Iamratanahl and Devasia [7] have investigated the minimum-time and minimum-energy output tracking problem for linear, multi-input, multi-output (MIMO) systems, yet constrained to square plants, i.e. plants having the same number of inputs and outputs. Afterwards, in [8] it has been shown that the output minimum transition time for nonlinear square MIMO systems under a constraint on the input intensity can be improved beyond the performance of the ‘bang-bang control’ by using pre- and post-actuation.

On returning to linear SISO systems, which are the subject of this paper, the system inversion problem has been often cast into transferring the system’s output from an initial value to a final one with some additional criteria, such as constraints on the shape of the output (for instance, not peeking, or having bounded derivatives [9]), or using minimum input energy [10].

The approach of ‘imposing the shape’ of the output taken in [9] has been extended recently in [11], where nonlinear scalar systems are considered, with the constraints fulfilment embedded into the input design optimization problem, and in [12], where the behavioural approach has been exploited to minimize the transition time and enforce a given smoothness degree of the input.

The above problems are made more difficult by the presence of right-half-plane zeros in the plant, which are common, for example, in the linearized models of flexible structures and cannot be recovered by the feedback controller: see [13] for an application. As explained in that paper, the transient tracking performance of linear MIMO systems is limited by its right-half-plane zeros, and a measure of performance that involves those zeros only can be given.

The limit case of nonhyperbolic systems, i.e. systems having zeros on the imaginary axis, which can lead the input signal to be very large [14], has been considered by Jetto et al.: see [15, 16]. In particular, the latter is one of the very few papers we are aware of that casts the inversion problem into a discrete-time frame, and assumes an ‘a priori’ structure of the input as a spline function. See also Marconi et al. [17] for a geometric approach to the problem for linear, discrete-time SISO systems.

In this paper, for SISO time-invariant systems we present an interpolation approach to the output tracking problem: the system’s output is forced to pass through a set of points taken from an ideal output, using a piecewise-constant input that minimizes the transition time, subject to a constraint on its intensity.

As already said, constraining the input intensity is often considered in the inversion literature, owing to its relevance in practical problems: see, e.g. [18], where a saturation approach is used, or [19], where constraints on both the input and its change rate are imposed.

The use of piecewise-constant input functions, also known as block-pulse functions (BPF), gives some advantages [20], or obeys to some constraints [21], where the structure of the controller is concerned. Piecewise-constant input functions are widely used, for example, in mobile robotics, where robots usually travel for the most part of their journey at a constant speed.

The main result of this contribution is a locally exact relationship between the transition time and the control effort needed for the transition. That relationship allows us to propose an algorithm that provides the minimum transition time for a given number of output values to be interpolated and a given bound on the input, and computes the values of the control signal segments.

Unlike the previously cited papers, owing to its purely algebraic nature, the algorithm we propose does not rely upon the stability and/or the minimum-phase property of the controlled system. It can be applied to time-varying systems as well, although in that case the relationship between the transition time and the control effort does not apply rigorously, and it has to be viewed as a heuristic approach. It is also worth to remark that the algorithm can be used in a model-free context, because it only requires the knowledge of the impulse response of the sampled data system: see Remark 1 in the next section.

A discussion about the behaviour of the system’s output far from the interpolation points is given, and a numerical comparison of the algorithm performance versus a method from the recent literature is also presented, which shows the effectiveness of the proposed approach.

Finally, an application of the proposed control approach to mobile robotics is presented, where a unicycle robot is driven to track a given trajectory. The method is applied to the input–output linearized model obtained by a feedback linearization technique [22], and then the optimal signal is used to feed the nonlinear system. This suggests that our approach can be straightforwardly applied also to nonlinear inversion problems when a linearizing-decoupling pre-controller is available.

2 Problem statement

Let \(\Sigma \) be the continuous-time, linear time-invariant SISO system of order n described by the state-space model

$$\begin{aligned} \Sigma = \left\{ \begin{array}{l} \dot{x}(t) = A x(t) + b u(t)\\[3pt] y(t) = c' x(t) \end{array}\right. , \end{aligned}$$

where \(x\in {\textbf {R}}^n\) is the state vector, \(u\in {\textbf {R}}\) and \(y\in {\textbf {R}}\) are the input and output signals, respectively, with \(A\in \mathbf {R}^{n\times n}\), b and \(c\in \mathbf {R}^n\). We assume \(x(0) = 0\) as the initial state, which in turn implies \(y(0) = 0\).

For a given \(T > 0\), let \(t_k = kT, k \in \mathbf {N}\), be a set of equally spaced time instants, and assume that the input u is constant in each interval \([t_k, t_{k+1})\), i.e. \(u(t) \equiv u(t_k)\) in that interval. Then the output of system \(\Sigma \) at the time instants \(t_k > 0\) is:

$$\begin{aligned} y(t_k) = c' \text {e}^{AT} x(t_{k-1}) + \int _{t_{k-1}}^{t_k} c' \text {e}^{A(t_k - \sigma )}\, b\, u(t_{k-1})\, \text {d}\sigma . \end{aligned}$$
(1)

For this system, the minimum-time, output interpolation problem we consider is:

Problem. Given a set \(\{y^*_k, \ k = 1, \ldots ,m\}\) of desired output values, find the smallest interval size T and the corresponding input sequence \(\{u(t_0),\ldots ,u(t_{m-1})\}\), such that \(y(t_k) = y^*_k\), and a threshold on the input intensity is fulfilled: \(\vert u(t_k)\vert \le U_M, k = 0, \ldots , m-1\).

In other words, the interval size \(T^*\) has to be chosen that solves the optimization problem:

$$\begin{aligned} \left\{ \begin{array}{l} \displaystyle \min _{T}\; \{mT\}\\ \begin{array}{l} \hbox {subject to}\\ \;\;y(t_k) = y^*_k,\; k = 1, \ldots , m\\ \;\;\vert u(t_k)\vert \le U_M,\; k = 0, \ldots , m-1 \end{array} \end{array}\right. , \end{aligned}$$
(2)

where \(y(t_k), k = 1, \ldots , m\), are given by Eq. (1).

To solve the problem we first note that, as the matrix A is constant, we have, independently of k:

$$\begin{aligned} \int _{t_{k-1}}^{t_k} \text {e}^{A(t_k - \sigma )}\, b\, \text {d}\sigma =\int _{0}^{T} \text {e}^{A(T - \sigma )}\, b\, \text {d}\sigma , \end{aligned}$$

and, denoting by \(\theta _T\) the integral at the r.h.s. of the previous formula, we obtain by iteration:

$$\begin{aligned} y(t_k) = \sum _{i=0}^{k-1} c' \text {e}^{A(k-1-i)T} \theta _T\, u(t_i). \end{aligned}$$

Finally, defining \(h_{p}(T) = c' \text {e}^{A(p-1)T} \theta _T\), we get

$$\begin{aligned} y(t_k) = \sum _{i=0}^{k-1} h_{k-i}(T)\, u(t_i). \end{aligned}$$
(3)

The sequence \(\{h_p(T), p \in {\textbf {N}}\}\), which depends on the choice of T, is the impulse response sequence of the sampled-data system corresponding to the continuous time system \(\Sigma \) for that value of T. Also notice that, if we let

$$\begin{aligned} h(t) = c' \text {e}^{A(t-T)} \theta _T,\; t \ge T, \end{aligned}$$
(4)

then we have \(h_p(T) = h(pT), p \in {\textbf {N}}\).

Remark 1

The generic value \(h_p(T)\) can be seen as the difference between two consecutive values of the step response \(y_s\) of the system, i.e.:

$$\begin{aligned} h_p(T) = y_s(t_{p}) - y_s(t_{p-1}). \end{aligned}$$
(5)

This allows to obtain the values \(h_p(T)\) also by a real-ground experiment or a numerical simulation.

In view of Eq. (3), the constraint \(y(t_k) = y^*_k\) is:

$$\begin{aligned} \sum _{i=0}^{k-1} h_{k-i}(T)\, u(t_i) = y^*_k,\; k = 1, \ldots , m, \end{aligned}$$

which is a linear algebraic system of the form \(H_T U = Y^*\), where \(H_T\) is the lower-triangular Toeplitz’s matrix

$$\begin{aligned} H_T = \left[ \begin{array}{ccccc} h_1(T) &{} 0 &{} 0 &{} \ldots &{} 0\\ h_2(T) &{} h_1(T) &{} 0 &{} \ldots &{} 0\\ h_3(T) &{} h_2(T) &{} h_1(T) &{} \ldots &{} 0\\ \vdots &{} \vdots &{} \vdots &{} \ddots &{}\\ h_m(T) &{} h_{m-1}(T) &{} h_{m-2}(T) &{} \ldots &{} h_1(T) \end{array}\right] \end{aligned}$$
(6)

and \(U = [u(t_0) \cdots u(t_{m-1})]', \;\; Y^* = [y_1^* \cdots y_m^*]'\).

Remark 2

Notice that the matrix \(H_T\) is nonsingular if and only if \(h_1(T) = c' \theta _T\ne 0\), i.e. if the step response of system \(\Sigma \) does not vanish at \(t = T\).

If \(h_1(T) \ne 0\), then the system \(H_T\, U = Y^*\) has a unique solution, and we rewrite Problem (2) in the more compact form

$$\begin{aligned} \left\{ \begin{array}{c} \displaystyle \min _{T}\; \{mT\}\\ \begin{array}{l} \hbox {subject to}\\ \;\;H_T\, U = Y^*\\ \;\;\Vert U\Vert _\infty \le U_M \end{array}. \end{array}\right. \end{aligned}$$
(7)

3 Main result

It is intuitive, on the basis of physical considerations, that the smaller we take T, the larger the maximum input size \(\Vert U\Vert _\infty \) becomes; this norm is bounded by [23, p. 345]

$$\begin{aligned} \Vert U\Vert _\infty \le \Vert H_T^{-1}\Vert _\infty \Vert Y^*\Vert _\infty . \end{aligned}$$
(8)

Where the infinity norm of \(H_T^{-1}\) is concerned, we will prove the following result.

Proposition 1

For sufficiently small values of T, the infinity norm of \(H^{-1}_T\) obeys to

$$\begin{aligned} \Vert H_T^{-1}\Vert _\infty \approx \frac{\eta (q,m)}{T^q}, \end{aligned}$$
(9)

where q is the order of first derivative of h that does not vanish at the origin, and \(\eta \) is independent of T.

Proof

See Appendix. \(\square \)

Remark 3

It is worth noticing that the value q in Proposition 1 is equal to the relative degree of system.

As a consequence of this result and of Eq. (8), increasing T makes, as expected, the upper bound on the control effort smaller, thus enlarging the feasible region of Problem (7), provided that T is small enough for Proposition 1 to hold. This is the rationale behind the algorithm to solve Problem (7) presented in the next section.

The numerical solution of  Toeplitz’s linear system \(H_T U = Y^*\) can be carried out either by any standard technique for triangular systems, with a computational cost of \(O(m^2)\) elementary operations, or by the tailored Commenges-Monsion’s algorithm [24], which requires \(O(m \log (m))\) flops.

4 Algorithm

The result of Sect. 3 enables us to propose an iterative algorithm to solve Problem (7). The idea is to start the search for the solution from a small value of T, that will probably violate the constraint on the input, and then increase that value by repeatedly doubling it until the constraint is satisfied.

In view of Proposition 1, each time T is doubled the intensity of the input needed for the control decreases, until a feasible solution is found, provided that T is small enough for Proposition 1 to apply. Formally, we have the following result about the local convergence of the algorithm.

Proposition 2

If the solution \(T^*\) of Problem (7) is small enough for Proposition 1 to hold, owing to the continuity of the objective function, the sequence generated by the proposed algorithm converges to it.

figure a

The above result, however, cannot guarantee the convergence to the solution of any instance of Problem (7), because the optimal solution could exist, but be large enough that the approximation given by Proposition 1 does not hold (that essentially depends on the time constants of the system). In that case the proposed algorithm has to be viewed as a heuristic procedure.

5 Output behaviour analysis

A limitation of the proposed method is that it guarantees the exact matching between the real output and the ideal one at the time instants \(t_k\), but not in the inner points of any interval \([t_{k}, t_{k+1})\), because no specification is given for those points.

However, it is generally desirable that the values of the output in the open interval \((t_{k}, t_{k+1})\) are not too far from the values \(y_{k}^*\) attained at \(t = t_{k}\), or similarly at \(t = t_{k+1}\).

It is intuitive, and it has been shown in [25] that this can be obtained by making T small enough, provided that this is allowed by the constraints. Here we give a limitation on the distance

$$\begin{aligned} e_k(t) = \vert y(t) - y(t_k) \vert , \quad t \in [t_{k},t_{k+1}), \end{aligned}$$

which accounts for the variability of the output to the right of each interpolation point.

In that interval, the system’s output is given by

$$\begin{aligned} y(t)= & {} c' \sum _{i=0}^{k-1} \text {e}^{A(t-(i+1)T)} \theta _T u(t_i)\\&+ c' \int ^t_{t_{k}} \text {e}^{A(t - \sigma )} b\, \text {d}\sigma \, u(t_{k}), \end{aligned}$$

and taking its first-order Taylor approximation around the instants \(t_k\) we get, for \(t \in [t_{k},t_{k+1})\),

$$\begin{aligned} e_k(t) = \vert y(t) - y(t_k) \vert \approx \vert \dot{y}(t_k) \vert (t - t_k). \end{aligned}$$

The computation of \(\dot{y}(t_k)\) yields

$$\begin{aligned} \dot{y}(t_k) = c' A \sum _{i=0}^{k-1} \text {e}^{A(k-1-i)T} \theta _T u(t_i) + c' b\, u(t_k), \end{aligned}$$

and, by taking into account the constraint on the input size, we get

$$\begin{aligned} \vert \dot{y}(t_k)\vert \le U_M \big [ \sum _{i=0}^{k-1} \vert c' A \text {e}^{A(k-1-i)T} \theta _T\vert + \vert c'b \vert \big ] , \end{aligned}$$

which is a bound that can be computed independently of the goal \(Y^*\) to be reached (but it needs that the interval length T has been fixed), or

$$\begin{aligned} \vert \dot{y}(t_k)\vert \le \sum _{i=0}^{k-1} \vert c' A \text {e}^{A(k-1-i)T} \theta _T\vert \vert u(t_i)\vert + \vert c'b\, u(t_k)\vert , \end{aligned}$$

which is a sharper bound that can be obtained once the target \(Y^*\) has been fixed and the input has been computed.

Denoting by \(Q_1(k,T,U_M)\) the first sum and by \(Q_2(k,T,U)\) the second one, we have two bounds for \(e_k(t)\):

$$\begin{aligned} e_k(t)\le & {} Q_1(k,T,U_M) (t - t_k), \\ e_k(t)\le & {} Q_2(k,T,U) (t - t_k), \end{aligned}$$

which are clearly null in \(t = t_k\), and maximized by \(t \rightarrow t_{k+1}\); in the latter case we have

$$\begin{aligned} \max _t \{e_k(t)\}\le & {} T\, Q_1(k,T,U_M), \\ \max _t \{e_k(t)\}\le & {} T\, Q_2(k,T,U). \end{aligned}$$

Thus, the first formula allows, for a given T and a given threshold \(U_M\) on the input size, to know the worst a priori error within each interval.

6 The time-varying case

The proposed approach can be extended to time-varying linear SISO systems described by

$$\begin{aligned} \Sigma _t = \left\{ \begin{array}{l} \dot{x}(t)=A(t) x(t) + b(t) u(t)\\ y(t) = c'(t) x(t) \end{array}\right. , \end{aligned}$$
(10)

with the initial condition \(x(t_0) = 0\). Given again a grid of equally spaced points \(t_k = kT, k \in \mathbf {N}\), and a piecewise constant input sequence \(\{u(t_0),\ldots ,u(t_{m-1})\}\), we can write

$$\begin{aligned} x(t_k) = \Phi (t_k,t_{k-1}) x(t_{k-1}) + \int _{t_{k-1}}^{t_k} \Phi (t_k,\sigma ) b(\sigma ) \text {d}\sigma u(t_{k-1}), \end{aligned}$$

where \(\Phi \) is the state transition matrix [26] of the system. Denoting by \(M(t_k,t_{k-1})\) the integral in the above formula we have

$$\begin{aligned} x(t_k) = \Phi (t_k,t_{k-1}) x(t_{k-1}) + M(t_k,t_{k-1})\, u(t_{k-1}), \end{aligned}$$

and we can again iterate, starting from \(x(t_0) = 0\), to obtain the solution at the time instants \(t_k\)

$$\begin{aligned} x(t_k) = \sum _{i=0}^{k-1} \Phi (t_k,t_{i+1}) M(t_{i+1},t_i)\, u(t_{i}), \end{aligned}$$

where the composition property \(\Phi (t,\sigma ) \Phi (\sigma ,\xi ) = \Phi (t,\xi )\) and \(\Phi (t,t) = I\) have been used [26].

Defining \(h_{k,i}(T) = c(t_k) \Phi (t_k,t_{i+1}) M(t_{i+1},t_i)\), the interpolation condition can be written also for the system \(\Sigma _t\)

$$\begin{aligned} \sum _{i=0}^{k-1} h_{k,i}(T) u(t_{i}) = y_k^*,\; k = 1, \ldots , m, \end{aligned}$$
(11)

which is again a lower triangular system, although the matrix \(H_T = \{h_{i,j}(T)\}, i,j = 1, \ldots , m\), is not a Toeplitz’s anymore. This implies that the proposed algorithm can still be used to find the optimal input sequence, but it has to be regarded as a heuristic, because the result of Proposition 1 does not apply.

7 Numerical experiments

In this section we report the results of three numerical experiments, aimed at investigating the effectiveness of the proposed algorithm in solving the minimum-time interpolation problem. The computations have been performed in MATLAB running on a standard PC. We denote by \(\tau = mT\) the length of the control interval, and in all experiments we take \(T_{min} = 10^{-8}\) and \(\varepsilon = 10^{-6}\).

In the three experiments, the ideal output is the polynomial function defined in the interval \([0, \tau ]\) proposed in [9]

$$\begin{aligned} y_d(t,\tau ) = \frac{(2p+1)!}{p!\,\tau ^{2p+1}} \sum _{i=0}^{p} \frac{(-1)^{p-i} \tau ^i t^{2p+1-i}}{i!\, (p-i)!\, (2p+1-i)}. \end{aligned}$$
(12)

That function and its first p derivatives vanish in \(t = 0\), the first p derivatives vanish also in \(t = \tau \), and the function is monotonically increasing independently of p, thus representing a smooth transition from the initial to the final values of the output.

The parameters to be set for each experiment are the input threshold \(U_M\), the number of desired output values m and the parameter p of (12). Following [9], the latter will be taken equal to the relative degree of the plant.

Remark 4

It is worth reporting that the three experiments have been performed also using the model-free approach illustrated in Remark 1, obtaining exactly the same results shown in this section.

7.1 Experiment 1

In the first numerical experiment we consider the problem proposed in [27], where a third-order nonminimum phase system is considered, described by the transfer function

$$\begin{aligned} G(s) = -\,4 \frac{(s - 1) (s + 1)}{(s + 2)(s^2 + s + 2)}; \end{aligned}$$
(13)

the ideal output function \(y_d(t,\tau )\) from which we have taken the desired output values \(y_k^*\) is polynomial (12) with \(p = 1\), i.e.

$$\begin{aligned} y_d(t,\tau ) = 3 \frac{t^2}{\tau ^2} - 2 \frac{t^3}{\tau ^3}, \quad t \in [0, \tau ]. \end{aligned}$$

The approach pursuit in that paper relies on the concept of cause/effect pairs associated with the system, and it is aimed at finding, between all input/output pairs satisfying some smoothness property, the one that minimizes the transition time between two set points.

In this experiment we set \(m = 8\), \(U_M = 1.4\). Figure 1 shows the error \(y(t) - y_d(t,\tau )\) and the piecewise constant control signal. The minimum control time found by the proposed algorithm is \(\tau ^* = 0.47\) s, which is half the value \(\tau ^* = 0.94\) s obtained in [27] using \(U_M = 1.2\).

We remark that a smooth control signal is generated by the method in [27], differently from our approach that returns a BPF, which is less expensive to be generated.

Fig. 1
figure 1

Error and BPF control signal for Experiment 1

7.2 Experiment 2

In the second experiment we have considered the problem proposed in [9], where a plant with transfer function

$$\begin{aligned} P(s) = \frac{377\,(s+2)}{((s + 2)^2 + 9)((s + 3)^2 + 49)} \end{aligned}$$

is controlled by the (proper) PID regulator

$$\begin{aligned} C(s) = K_c \frac{s^2 + 2\delta \omega _n s + \omega _n^2}{s(s + 50)} \end{aligned}$$

with \(K_c = 3.6172, \delta = 0.4323\) and \(\omega _n = 5.1073\), in a unity-feedback scheme that gives rise to a sixth-order system with a relative degree of three.

The value \(p = 3\), equal to the relative degree of the closed-loop plant, has been taken in Eq. (12), yielding to the ideal output function

$$\begin{aligned} y_d(t,\tau ) = 35\, \frac{t^4}{\tau ^4} - 84\, \frac{t^5}{\tau ^5} +70\, \frac{t^6}{\tau ^6} - 20\, \frac{t^7}{\tau ^7}, \quad t \in [0, \tau ]. \end{aligned}$$

This problem has been solved in [9] using a bisection search scheme similar to the one proposed here, which involves a global optimization search in a single variable at each step, and there the optimal value \(\tau ^* = 0.367\) s has been found, using a threshold \(U_M = 3\) on the input intensity.

We have used for our algorithm the threshold value \(U_M = 2.8\) and \(m = 5\), and have obtained \(\tau ^* = 0.358\) s, which is slightly better than the value obtained in the cited paper.

Figure 2 shows the functions y(t) and \(y_d(t,\tau )\) and the piecewise constant control signal. There you can see that, owing to a couple of complex poles with very low damping (\(\delta =0.15\)), the system output peeks in the time intervals between the interpolation points.

The last comment made for the previous numerical experiment also applies to this one.

Fig. 2
figure 2

Real and ideal outputs and BPF control signal for Experiment 2

7.3 Experiment 3

In the third experiment we consider the problem presented in [28], where a rocket must follow a one-dimensional position profile, and the rocket’s mass is time-varying because of the fuel consumption during the journey.

It is assumed that the rocket’s mass varies according to

$$\begin{aligned} m(t) = m_R + m_F \text {e}^{-\alpha t}, \end{aligned}$$

where \(m_R\) is the mass of the empty rocket, \(m_F\) is the initial mass of the fuel, and \(\alpha \) is the fuel’s consumption rate.

Fig. 3
figure 3

Error and BPF control signal for Experiment 3

On denoting by z(t) the position of the rocket and by \(\zeta \) the viscous friction coefficient, the rocket’s motion is governed byFootnote 1

$$\begin{aligned} \frac{\text {d}}{\text {d}t}(m(t)\dot{z}(t)) = u(t) - \zeta \frac{\text {d}z(t)}{\text {d}t}, \end{aligned}$$

and, returning to the dot notation for the time derivatives:

$$\begin{aligned} m(t)\ddot{z}(t) + (\dot{m}(t) + \zeta ) \dot{z}(t) = u(t). \end{aligned}$$

Suppose that a proportional position controller with value K has been pre-wrapped to the plant, obtaining the model

$$\begin{aligned} m(t)\ddot{z}(t) + (\dot{m}(t) + \zeta ) \dot{z}(t) + K z(t) = u(t); \end{aligned}$$

on defining \(x(t) = [z(t)\; \dot{z}(t)]'\), the last equation can be re-written in state-space form (10) with the positions

$$\begin{aligned} A(t) = \left[ \begin{array}{cc} 0 &{} 1 \\ -\frac{K}{m(t)} &{} -\frac{ \dot{m}(t) + \zeta }{m(t)} \end{array}\right] , \; b(t) = \left[ \begin{array}{c} 1 \\ \frac{1}{m(t)} \end{array}\right] , \; c(t) = \left[ \begin{array}{c} 1 \\ 0 \end{array}\right] . \end{aligned}$$

The plant’s physical parameters are \(m_R = 1.5\) kg, \(m_F = 1\) kg, \(\zeta = 10^{-5}\) N s/m, \(\alpha = 0.5\,\hbox {s}^{-1}\), and the proportional controller is \(K = 5\). The ideal output trajectory in this case is given again by Eq. (12) with \(p = 4\), which is an arbitrary choice, although the concept or relative degree has been introduced also for time-varying systems [30].

The numerical computation of functions \(h_{ij}\) of Eq. (11) for this model has been performed by a simulation, using the integrator ode45 of MATLAB, assuming as input a suitable set of m block-pulse functions. The parameters of the algorithm we have used in this case are \(m = 8\) and \(U_M = 12\). The optimal value of \(\tau \) found by our method is \(\tau ^* = 1.41\) s, and the tracking error and the input are shown in Fig. 3.

Fig. 4
figure 4

The unicycle mobile robot

8 An application to mobile robotics

In this section, the application of the proposed approach to the control problem of the unicycle mobile robot is considered. That kind of mobile robot is modelled as in [22]

$$\begin{aligned} \left\{ \begin{array}{l} \dot{x}_r(t) = v_r(t)\cos (\theta _r(t))\\ \dot{y}_r(t) = v_r(t)\cos (\theta _r(t))\\ \dot{\theta }_r(t) = \omega _r(t), \end{array}\right. \end{aligned}$$
(14)

where \(x_r, y_r, \theta _r\) represent the robot’s pose, i.e. the robot centre’s coordinates in the plane and its heading, while \(v_r\) and \(\omega _r\) are the robot’s inputs. In particular, \(v_r\) is the driving velocity, i.e. the modulus (including the sign) of the velocity vector of the contact point, whereas the steering velocity \(\omega _r\) is the angular velocity of the wheel around the vertical axis passing through the robot’s centre: see Fig. 4. Assuming that the robot’s inputs are constrained by \(\vert v_r(t)\vert \le V\) and \(\vert \omega _r(t)\vert \le \Omega \), the goal is to design a control law that drives the robot along a desired trajectory \((x^*(t), y^*(t))\).

To this aim, the standard input–output linearization method [22] has been used: by applying the control law

$$\begin{aligned} \left[ \begin{array}{l} v_r(t)\\ \omega _r(t) \end{array}\right] =\left[ \begin{array}{rr} \cos (\theta _r(t)) &{} -b\sin (\theta _r(t)) \\ \sin (\theta _r(t)) &{} b\cos (\theta _r(t)) \end{array}\right] ^{-1} \left[ \begin{array}{l} u_x(t)\\ u_y(t) \end{array}\right] , \end{aligned}$$
(15)

robot’s model (14) is straightforwardly reformulated as

$$\begin{aligned} \left\{ \begin{array}{ll} \dot{x}_B(t) &{}= u_x(t)\\ \dot{y}_B(t) &{}= u_y(t) \end{array}\right. , \end{aligned}$$
(16)

where \((x_B, y_B)\) are the coordinates of a point B located along the sagittal axis of the unicycle at a distance \(b > 0\) from its centre. Note that the robot’s heading angle \(\theta _r\) cannot be controlled by this technique.

Fig. 5
figure 5

The proposed control scheme for the unicycle

The proposed method is then applied to linearized and decoupled model (16) to drive the robot along a desired path; the resulting control scheme is shown in Fig. 5. The constraints to impose on the ‘virtual inputs’ \(u_x\) and \(u_y\) to satisfy the real constraints on \(v_r\) and \(\omega _r\) can be obtained by writing linearization law (15) explicitly

$$\begin{aligned} v_r(t)= & {} u_x(t)\cos (\theta _r(t))+u_y(t)\sin (\theta _r(t))\\ \omega _r(t)= & {} (u_y(t)\cos (\theta _r(t))-u_x(t)\sin (\theta _r(t)))\, b^{-1} \end{aligned}$$

and obtaining

$$\begin{aligned} \begin{array}{l} \vert v_r(t)\vert \le \vert u_x(t)\vert + \vert u_y(t)\vert \\ \vert \omega _r(t)\vert \le (\vert u_x(t)\vert + \vert u_y(t) \vert )\, b^{-1} \end{array} . \end{aligned}$$

It follows easily that by imposing the ‘virtual constraints’ \(\vert u_x(t)\vert \le U_M\) and \(\vert u_y(t)\vert \le U_M\), with \(U_M \le \min \{V,\Omega \, b \}/2\), also the real constraints will be satisfied.

The BPF control laws are then designed independently on the \(x_B\) and \(y_B\) axes using single integrator-based evolution (16). Two candidate values for T are obtained, namely \(T_x\) and \(T_y\), one for each axis. To be compliant with the desired trajectory on both axes, the value of T is chosen as the largest of them, and then the virtual signals \(u_x(t)\) and \(u_y(t)\) are computed.

Fig. 6
figure 6

Red line: reference trajectory. Blue line: trajectory of the point \((x_B,y_B)\). Magenta line: unicycle trajectory. The red circles represent \((x^*(kT), y^*(kT))\), while the black triangles are snapshots of the robot’s pose in some instants

In Fig. 6 the reference trajectory and the robot motion are shown. The constraints used in this simulation were \(V = 2\) m s\({}^{-1}\), \(\Omega = \pi \) rad s\({}^{-1}\), and \(b = 0.5\) m. A total of \(m = 25\) input pulses have been used, and \(T^* = 1.46\) s has been obtained.

The resulting control inputs \(u_x(t)\) and \(u_y(t)\) are reported in Fig. 7, and as expected, they are compliant with the imposed constraints.

The evolution of \((x_B, y_B)\) coincides with the reference trajectory at the points \((x^*(kT),y^*(kT))\), while the robot’s centre trajectory error satisfies

$$(x_r(kT)-x^*(kT))^2+(y_r(kT)-y^*(kT))^2 \le b^2,$$

as it is expected due to the input–output linearization.

Fig. 7
figure 7

Virtual (BPF) control signal \(u_x(t)\) and \(u_y(t)\) (blue) and actual control signal \(v_r(t)\) and \(\omega _r(t)\) (red). The dashed lines represent the physical and the virtual constraints

9 Conclusions

We have proposed a control methodology to solve the inversion problem for linear SISO systems with a minimum-time criterion and a bounded piecewise-constant input. We have shown that, in the proposed setting, the norm of the input is a decreasing function of the control interval length, a property that is often assumed true on the basis of physical considerations but that is formally proven only in specific cases.

Two distinguishing features of the proposed method are that it does not rely on any assumption, besides linearity, on the plant, and that it can be used in a model-free context, as the only data needed are the step response of the system.

Furthermore, it has been applied successfully to the control of a nonlinear system for which a linearizing/decoupling controller can be devised.

Last, but not by relevance, the proposed approach generates a control signal of the BPF type, that needs, for its generation in a practical implementation, a much simpler controller, making it appealing in the industrial applications.

The current research aims at two goals: (i) to extend the proposed approach to MIMO systems, and (ii) to propose a suitable optimization algorithm to replace the naive bisection search.