1 Introduction

In many real-world applications involving sensing, actuation, and decision making, time delays arise naturally. This is mainly due to the time needed to sense and transmit information, and to prepare and execute actuator commands. The presence of delays may cause poor performance, import instability, and pose major limitations on the ability to control [14]. In the context of linear time-invariant (LTI) systems, effects of delays can be interpreted based on the behavior of system eigenvalues with respect to the delay parameter. Since delays manipulate the eigenvalues, if the controller is not properly designed, then these eigenvalues with the influence of delays may bring low damping or instability to the dynamics. To remedy this, one needs to carefully design the controller, incorporating explicitly the delay parameter into the design process.

Control design in the presence of delays is challenging. Some solutions to this problem were proposed based on the Lyapunov stability theory [2] and even beyond LTI systems [5, 6], where delay-range-dependent stability in the presence of time-varying delays was studied, both in continuous and discrete time. Lyapunov-based approaches are indeed versatile as they can address a large class of control problems; and are attractive as the corresponding problems can be solved efficiently via optimization tools under convexity assumptions, and even for multiple controller gains. On the other hand, conservatism posed on stability conditions and difficulties in designing structured controllers lead one to pursue alternatives especially in the case of LTI systems. One option is to formulate the control problem in frequency domain and take an eigenvalue-based approach. Know-how of control design in the frequency domain however is much limited, mainly characterized by the arising control problem being infinite dimensional [7] and the inherent difficulties in handling multiple design parameters using the system characteristic equation. Many studies along these lines therefore remained to focus on designing few parameters for LTI SISO systems. Some key studies can be found in [814].

Frequency domain techniques are however still attractive as they can be used to analyze the stability of LTI systems, without any conservatism. Moreover, these techniques can be used to formulate structured controllers. In this direction, most advancements were made by focusing on the rightmost root of the closed-loop system characteristic equation, and tuning the controller gains accordingly [1417]. In this effort, the delay in the control loop is given and/or designed together with the controller while optimizing the real part of the rightmost root. Other contributions in the literature include delay-dependent stability where by tuning the controller parameters stability can be achieved within a delay margin \(\overline{\tau }\), that is, the system is stable for all delays \(\tau \) satisfying \(\tau \in [0,\overline{\tau })\) [18]. Complementary to this is the well-known delay independent stability (DIS) where the system is stable regardless of the amount of delays, i.e., the delay margin is infinite, \(\overline{\tau }\rightarrow +\infty \). Existing work in this direction includes testing whether or not a given LTI system with single or multiple delays exhibits DIS property; see [1921] and the references therein, or designing certain system parameters such that the LTI system can be made delay-independent stable [22, 23].

Furthermore, numerous techniques were published for the “analysis” of the delay parameter space. In these work, the objective is to find out, given system characteristic equation, what the stability/instability decomposition of the system is in any parameter space, including delay \(\tau \) [3]. This analysis may reveal that the system can be stable in more than one delay interval [4, 24]. Such a property can be useful in many applications. For example, larger delays falling into the second delay interval can be more favorable from the viewpoint of a system’s disturbance-rejection capability [25]. Moreover, closed-loop systems cannot be always made delay-independent stable, and hence having multiple stable intervals as options for the system to operate is desirable. In other cases, the maximum achievable delay margin of the closed-loop system is upper bounded \(\bar{\tau }<\tau ^{*}\) due to open-loop unstable poles [26] and hence closed-loop system stability cannot be guaranteed for \(\tau =\tau ^{\prime }>\tau ^{*}\) even if one reconfigures the controller. A remedy to this would be to design multiple stable delay intervals, one of which containing the delay \(\tau ^{\prime }\). In the case of open-loop settings, multiple delay intervals are critical when self-excitations are affected by time delays. One notable example is the delay-induced regenerative chatter where the well-known stability lobes are essentially the stability intervals [4, 13] corresponding to proper machining settings including machine tool speed, which is inversely proportional to the delay term.

While having a system with multiple stable delay intervals is attractive as reviewed above, most of the existing work remains to focus on the forward problem where system characteristic equation is given, and stability intervals along \(\tau \) are to be computed. A control design approach based on these techniques cannot certify stability in pre-set delay intervals, but requires brut force re-checking and plotting, which also limits the design to one or two parameters. As a matter of fact, in many design problems, the reverse problem is more relevant, where one needs to reveal the controller gains by which certain stability intervals along \(\tau \) can be crafted strategically. Such an effort is extremely complicated mathematically, and if properly constructed, would have practicable impacts on the control of LTI systems.

To the best of our knowledge, this article is the first attempt in the above described design problem with stability “certificates” in pre-set delay intervals. To lay out the main principles of the approach, here we focus on a class of LTI SISO systems for which we create two disjoint stability intervals along \(\tau \), as depicted in Fig. 1, by designing multiple coefficients of the corresponding closed-loop characteristic equation. This in essence is achieved by carefully formulating the control design problem in frequency domain and next solving it efficiently using optimization tools.

Fig. 1
figure 1

Desired stability decomposition of the closed loop system in Fig. 2

2 Problem statement

In general, a SISO system with a single delay \(\tau \) around the control loop, as shown in Fig. 2, has the following characteristic equation:

$$\begin{aligned} F(s,e^{-s\tau })=A(s)+B(s)e^{-s\tau }=0, \end{aligned}$$
(1)

where \(s\in {\mathbb {C}}\) is the Laplace variable, the delay is non-negative \(\tau \ge 0\), and polynomials A(s) and B(s) are nothing but respectively the numerator and denominator of \(C(s)\cdot G(s)\). Here, these polynomials are in the general form,

$$\begin{aligned}&A(s)=s^{m}+a_{m-1}s^{m-1}+\cdots +a_{1}s+a_{0}\nonumber \\&B(s)=b_{n}s^{n}+b_{n-1}s^{n-1}+\cdots +b_{1}s+b_{0} \end{aligned}$$
(2)

where \(a_{k}\), \(b_{k}\) are real, \(b_n\ne 0\), and \(\deg (A(s))=m\,\ge \,\deg (B(s))=n\) for causality reasons.

When \(m>n\), the system is of retarded type [4]. This indicates that the highest order derivative in the system dynamics is not affected by any delay terms. The case of \(m=n\) corresponds to neutral class systems [27, 28], which present a number of unique properties related to their spectrum. To keep the presentation compact, in the sequel, we present all the developments first for retarded class systems. Adapting these results for neutral class systems will then easily follow (see Remark 7).

The main problem at hand is that, given G(s), we would like to design C(s) such that the closed-loop system in Fig. 2 with the corresponding characteristic equation (1) is asymptotically stable for all delay values \(\tau \) in the feedback falling within the pre-determined intervals \(\tau \in [0,h_{1})\cup (h_{2},h_{3})\) as depicted in Fig. 1, and marginally stable for delays \({h}_1\), \({h}_2\), and \({h}_3\).

Fig. 2
figure 2

Model of the SISO LTI system with single delay \(\tau \) in the feedback

3 Preliminaries

To design a retarded type system to be in stability/instability transition at \(\tau =h_{1}\), \(h_{2}\), \(h_{3}\) delay values, we need to study the roots of the characteristic equation (1) that are on the imaginary axis, \(s=j\omega \) [4]. We also need to make sure no other crossings occur for delay values interfering the sequence \(h_{1}\), \(h_{2}\), \(h_{3}\), and that \(s=j\omega \) roots tend to cross the imaginary axis toward \({\mathbb {C}}_{+}\) at \(h_{1}\), \(h_{3}\), but toward \({\mathbb {C}}_{-}\) at \(h_{2}\). Moreover, since for retarded systems, stability of (1) at \(\tau =0\) is preserved as \(\tau \rightarrow 0^{+}\), it suffices to guarantee the stability of \(A(s)+B(s)\) such that \(A(s)+B(s)e^{-s\tau }\) is also a stable polynomial for \(\tau =0^{+}\) [4, 27]. These knowledge will be the starting point in the following developments.

Note that designing the polynomials A(s) and B(s) to achieve a desired stability decomposition as shown in Fig. 1 is quite complicated, mainly because solving the transcendental equation (1) is impossible. On the other hand, many studies can be followed in order to develop a systematic approach to achieve this nontrivial task (see Sect. 4). Before we present these new results, in the sequel, we first revisit the work of [29], to carry out the mathematics.

3.1 Computing the imaginary crossings

Since from the stability point of view, the most critical roots of (1) are those that are on the imaginary axis, \(s=j\omega \), following [29], we can calculate these roots by writing down a new equation by replacing s with \(-s\) in (1). That is, \(F(s,e^{-s\tau })=0\) and \(F(-s,e^{s\tau })=0\) have the same roots on the imaginary axis. This is as per the symmetricity of system characteristic roots with respect to the real axis of the complex plane. It then follows:

$$\begin{aligned} {\left\{ \begin{array}{ll} A(s)+B(s)e^{-s\tau }=0\\ A(-s)+B(-s)e^{s\tau }=0 \end{array}\right. } \end{aligned}$$
(3)

and after the elimination of \(e^{-s\tau }\) from (3), one obtains

$$\begin{aligned} A(s)A(-s)-B(s)B(-s)=0 \end{aligned}$$
(4)

which is an even polynomial in s. Then, with \(s=j\omega \) and hence \(\omega ^{2}=-s^{2}\), Eq. (4) can be rearranged into

$$\begin{aligned} W(\omega ^{2})=|A(j\omega )|^{2}-|B(j\omega )|^{2}=0 \end{aligned}$$
(5)

whose \(\omega ^{2}>0\) roots are related to \(s=j\omega \) roots of (3) for some \(\tau \ge 0\).

Remark 1

The system with the characteristic equation (1) has an imaginary axis root at \(s=j\omega ^{*}\) if and only if \(W({\omega ^{*}}^{2})=0\) [30]. In the case of multi-input multi-output (MIMO) systems, the characteristic equation may contain commensurate delays. In such cases, imaginary roots of the characteristic equation may constitute only a subset of the roots of the transformed equation \(W({\omega ^{*}}^{2})=0\) [31]. One should therefore pay attention to handling such cases when using this elimination technique. Since we do not have commensurate delays in (1), this does not pose any issues in what follows.

Once \(W(\omega ^{2})=0\) in (5) is solved for \(\omega ^{2}>0\), the set of solutions, namely, the crossing set, is formed as \(\omega =\{\omega _{c1}, \omega _{c2},\ldots ,\omega _{cM}\}\), where M is the maximum number of crossings. Since the highest power of A(s) is m, we have that \(M\le m\). Next, the delay values creating an imaginary crossing at \(s=j\omega _{c\nu }\) are calculated. For this, one obtains \(e^{j\omega \tau }=-\frac{B(j\omega )}{A(j\omega )}\) from (1), which then yields, for each \(\omega =\omega _{c\nu }\),

$$\begin{aligned} \tau _{k,\nu }=\frac{1}{\omega _{c\nu }}\left( \angle {B(j\omega _{c\nu })}-\angle {A(j\omega _{c\nu })}+\pi \mp 2k\pi \right) \end{aligned}$$
(6)

where \(k=0,1,\ldots ,\infty ,\quad \nu =1,\ldots ,M\). That is, for each crossing \(\omega _{c\nu }\), \(\nu =1,\ldots ,M\), we have infinitely many delays \(\tau _{k,\nu }\) and the union of these delays \(\bigcup _{k}\bigcup _{\nu }\tau _{k,\nu }\) gives rise to all delays that create imaginary axis crossings of the closed-loop system represented by (1) [24, 30].

Remark 2

With the assumption that \(\omega _{c\nu }>0\) without loss of generality, we then have in general,

$$\begin{aligned} \omega _{c1}\ge \omega _{c2}\ge \cdots \ge \omega _{cM}>0 \end{aligned}$$
(7)

where stability of the delay-free system guarantees \(\omega _{cM}\ne 0\) for any finite \(\tau \).

3.2 Computing the critical delay values

Denote now by \(\widetilde{\tau }_{\nu }\) the minimum positive delay value \(\tau \) in (6) with respect to each \(\omega _{c\nu }\). This delay can be expressed as:

$$\begin{aligned} \widetilde{\tau }_{\nu }=\frac{1}{\omega _{c\nu }}{\left\{ \begin{array}{ll} \arctan 2(y,x),&{}\text {if }\arctan 2(y,x)\ge 0;\\ \arctan 2(y,x)+2\pi ,&{}\text {if }\arctan 2(y,x)<0. \end{array}\right. } \end{aligned}$$
(8)

where

$$\begin{aligned} x=\mathfrak {R}\left( -\frac{B(j\omega _{c\nu })}{A(j\omega _{c\nu })}\right) ,\quad y=\mathfrak {I}\left( -\frac{B(j\omega _{c\nu })}{A(j\omega _{c\nu })}\right) \end{aligned}$$

Since as per (6), for each \(\omega _{c\nu }\), there exist infinitely many periodically spaced \(\tau _{k,\nu }\) values with the period \(\frac{2\pi }{\omega _{c\nu }}\), then using (8) each \(\tau _{k,\nu }\) in (6) can be compactly formulated as

$$\begin{aligned} \tau _{k,\nu }=\widetilde{\tau }_{\nu }+\frac{2\pi }{\omega _{c\nu }}k,\quad k=0,1,\ldots ,\infty ,\quad \nu =1,\ldots ,M \end{aligned}$$
(9)

3.3 Computing the root tendency

For each imaginary crossing at \(\omega _{c\nu }\), \(\nu =1,\ldots ,M\), there exist infinitely many delay values \(\tau _{k,\nu }\) as per (9). As the delay \(\tau \) is slightly increased past the critical delay value \(\tau _{k,\nu }\) is the characteristic root on the imaginary axis \(s=j\omega _{c\nu }\) will be perturbed, either into \({\mathbb {C}}_{-}\) or \({\mathbb {C}}_{+}\). Depending on which direction the root moves, the system will have two more, or less, unstable roots. Root tendency (RT) is aimed at calculating this movement via a sensitivity formula at \(j\omega _{c\nu }\) with respect to \(\tau _{k,\nu }\) [24, 30, 32]. It is defined as

$$\begin{aligned} RT_{k,\nu }= & {} sgn\left[ \mathfrak {R}\left( \frac{ds}{d\tau }\Big |_{\tau =\tau _{k,\nu },s=j\omega _{c\nu }}\right) \right] ,\nonumber \\&k=0,1,\ldots ,\infty ,\quad \nu =1,\ldots ,M \end{aligned}$$
(10)

It is known that (10) is invariant for all delays corresponding to a specific crossing of (1), see, e.g. [24]. That is, (10) is invariant with respect to the counter k. This implies that given \(\nu \), \(RT_{k,\nu }\) is fixed for all k. For this reason, we can write \(RT_{\nu }\) instead of \(RT_{k,\nu }\).

Moreover, when \(\tau \) increases slightly past \(\tau _{k,\nu }\), if \(RT_{\nu }=+1\), then the root at \(s=j\omega _{c\nu }\) crosses the imaginary axis always from left-half plane (LHP) to right-half plane (RHP), i.e., from stable to unstable, for all \(\tau _{k,\nu }\); else if \(RT_{\nu }=-1\), then the root always crosses from RHP to LHP (from unstable to stable) for all the corresponding delays \(\tau _{k,\nu }\,(k=0,1,2,\ldots )\).

Remark 3

[29] If a pair of characteristic roots, \(s = \mp j\omega \), only touches the imaginary axis then so \(W(\omega ^{2})\) touches \(\omega ^{2}\)-axis. If the characteristic roots cross from LHP(RHP) to RHP(LHP), then \(W(\omega ^{2})\) crosses from below(above) to above(below) the positive \(\omega ^{2}\)-axis.

Based on Remark 3, the following relationships hold:

$$\begin{aligned} RT_{\nu }=sgn\left[ \frac{dW(\sigma )}{d\sigma }\right] \Big |_{\sigma =\omega _{c\nu }^{2}}=sgn[W^{\prime }(\omega _{c\nu }^{2})] \end{aligned}$$
(11)

Remark 4

In general, for SISO systems, when crossing values \(\omega _{c\nu }\) are unique, and sorted in order \(\omega _{c1}>\cdots>\omega _{c\nu }>\cdots >\omega _{cM}\), then \(RT_{\nu }\) corresponding to each one of these crossings have alternating signs. Moreover since (1) represents a retarded class system, \(W(\omega ^{2})\) goes to \(+\infty \) with \(\omega \) increasing. Owing to this, \(RT_{1}=+1\) at the largest crossing \(\omega _{c1}\), \(RT_{2}=-1\) at \(\omega _{c2}\) and so on [30]. Special cases must be carefully considered, for example, when \(\omega _{c\nu }\) is a tangent point of curve \(W(\omega ^{2})\) [29] or when (1) has multiple roots [33, 34]. For the sake of considering the general cases, here we shall assume that crossings \(\omega _{c\nu }>0\) are distinct.

4 Main results

In this article, the main interest is to design a controller C(s) for an open-loop plant with transfer function G(s) subject to delay, achieving closed-loop stability in two pre-determined delay intervals (Fig. 1). To keep the presentation compact, we first take G(s) as a second-order plant,Footnote 1

$$\begin{aligned} G(s)=\frac{1}{s^{2}+2\zeta \omega _{n}s+\omega _{n}^{2}} \end{aligned}$$
(12)

Following the standard definitions, here \(\zeta \) and \(\omega _{n}\) are defined respectively as damping ratio and natural frequency of the open-loop plant.

For the design of C(s), the following conditions must be met:

  • Condition A. The SISO LTI closed-loop system is stable for the delay-free case (\(\tau =0\));

  • Condition B. Given \(h_{1}\), \(h_{2}\) and \(h_{3}\) with \(0<h_{1}<h_{2}<h_{3}\), the SISO LTI closed-loop system is stable for delays satisfying \(\tau \in [0,h_{1})\cup (h_{2},h_{3})\), and marginally stable for \({h}_1\), \({h}_2\), and \({h}_3\);

  • Condition C. The controller C(s) itself is stable.

4.1 Sufficient conditions

We first establish the sufficient conditions to be satisfied within the design process of C(s). The following steps are considered for this purpose:

Step 1: Assignment of \(\tau =h_{1}\), \(h_{2}\), \(h_{3}\) to crossings \(\omega _{c\nu }\).

The system has two separate stable intervals in \(\tau \) parameter space. Specifically, the first three critical delay values, which cause stability–instability switches, are denoted by \(h_{1}\), \(h_{2}\) and \(h_{3}\).

A strategic decision here is that the number of crossings M will be set to 2 (see also Step 3), where we have two crossing values \(\omega _{c1}\) and \(\omega _{c2}\). Due to Remark 4, note that we have \(\omega _{c1}>\omega _{c2}\), with \(s=j\omega _{c1}\) causing destabilizing crossing and \(s=j\omega _{c2}\) creating a stabilizing crossing. Accordingly \(h_{1}\) and \(h_{3}\) are assigned to the same crossing \(\omega _{c1}\), while being the successive delays values causing this crossing. That is, \(\tau _{0,1}=\widetilde{\tau }_{1}=h_{1}\), and \(\tau _{1,1}=h_{3}\) in (9), hence \(h_{3}=h_{1}+\frac{2\pi }{\omega _{c1}}\). Next, \(\omega _{c2}\) is assigned to \(h_{2}\), which corresponds to \(\tau _{0,2}=\widetilde{\tau }_{2}=h_{2}\) in (9).

Moreover, since \(h_{1}\) is the minimum positive \(\widetilde{\tau }_{1}\) value with respect to \(\omega _{c1}\) and \(h_{3}\) is the successive critical delay \(\tau _{1,1}\), we have the condition \(2h_{1}<h_{3}\). In other words, although \(h_{1}, h_{2}, h_{3}\) can be arbitrarily selected by the designer, \(2h_{1}<h_{3}\) must still be respected. In general, the initial selection of \(h_{1}\) and \(h_{3}\) follows \(h_{3}=h^{{*}}_{3}\) where

$$\begin{aligned} h^{{*}}_{3}={\left\{ \begin{array}{ll} h_{3},&{}\text {if }2h_{1}<h_{3};\\ 2h_{1}+\lambda ,&{}\text {if }2h_{1}\ge h_{3}, \end{array}\right. } \end{aligned}$$
(13)

and \(\lambda \) is a positive number.

Now that \(h_{1}\) and \(h_{3}\) are given, \(\omega _{c1}\) can be calculated from (9) as

$$\begin{aligned} \omega _{c1}=\frac{2\pi }{h_{3}-h_{1}}. \end{aligned}$$

Step 2: Structure of C(s).

Let C(s) be in the form of \(\frac{N(s)}{D(s)}\), where \(deg[D(s)]\ge deg[N(s)]\). Since the design of stability intervals in Fig. 1 relies on the infinite dimensional system characteristic equation, one must make sure there are sufficiently many design parameters to achieve this goal. For example, the polynomials D(s) and N(s) can be expressed as follows:

$$\begin{aligned} D(s)=s^{2}+\alpha _{1}s+\alpha _{0},\quad N(s)=\beta _{2}s^{2}+\beta _{1}s+\beta _{0} \end{aligned}$$
(14)

where \(\alpha _{0},\alpha _{1},\beta _{0},\beta _{1},\beta _{2}\in {\mathbb {R}}\) are design parameters.

The characteristics equation in this case becomes

$$\begin{aligned} F(s,e^{-s\tau },\alpha _{k},\beta _{k})= & {} \left( s^{2}+\alpha _{1}s+\alpha _{0}\right) \left( s^{2}+2\zeta \omega _{n}s+\omega _{n}^{2}\right) \nonumber \\&+\left( \beta _{2}s^{2}+\beta _{1}s+\beta _{0}\right) e^{-s\tau } \end{aligned}$$
(15)

where the general form in (1) reads

$$\begin{aligned} A(s)&=(s^{2}+\alpha _{1}s+\alpha _{0})\left( s^{2}+2\zeta \omega _{n}s+\omega _{n}^{2}\right) \\ B(s)&=\beta _{2}s^{2}+\beta _{1}s+\beta _{0} \end{aligned}$$

At this point, we have 6 unknowns \(\omega _{c2}\), \(\alpha _{0}\), \(\alpha _{1}\), \(\beta _{0}\), \(\beta _{1}\), \(\beta _{2}\) in total, denoted by the vector \(\chi =[\omega _{c2}, \alpha _{0}, \alpha _{1}, \beta _{0}, \beta _{1}, \beta _{2}]\). Next we formulate the constraints that this vector should comply with.

Step 3: Constraints \({\mathscr {C}}\) for all specifications.

From (15), Walton’s equation can be written as

$$\begin{aligned} W(\omega ^{2})= & {} \omega ^{8}-\left( -4\omega _{n}^{2}\zeta ^{2}-\alpha _{1}^{2}+2\omega _{n}^{2}+2\alpha _{0}\right) \omega ^{6}\nonumber \\&+\,\bigl (4\alpha _{1}^{2}\omega _{n}^{2}\zeta ^{2} -8\alpha _{0}\omega _{n}^{2}\zeta ^{2}-2\alpha _{1}^{2}\omega _{n}^{2}+\omega _{n}^{4}\nonumber \\&+\,4\alpha _{0}\omega _{n}^{2}+\alpha _{0}^{2}-\beta _{2}^{2}\bigr )\omega ^{4}-\bigl (-4\alpha _{0}^{2}\omega _{n}^{2}\zeta ^{2}\nonumber \\&-\,\alpha _{1}^{2}\omega _{n}^{4}+2\alpha _{0}\omega _{n}^{4}+2\alpha _{0}^{2}\omega _{n}^{2}\nonumber \\&-\,2\beta _{0}\beta _{2}+\beta _{1}^{2}\bigr )\omega ^{2}+\left( \alpha _{0}^{2}\omega _{n}^{4}-\beta _{0}^{2}\right) \end{aligned}$$
(16)

Through (16), we have 2 constraints related to the imaginary axis crossing values:

$$\begin{aligned}&{\mathscr {C}}_{1}:W(\omega _{c1}^{2})=0,\\&{\mathscr {C}}_{2}:W(\omega _{c2}^{2})=0. \end{aligned}$$

As for the minimum positive critical delay value, refering to (8), we revise x and y variables as

$$\begin{aligned}&x_{k}=\mathfrak {R}\left( -\frac{\beta _{2}s^{2}+\beta _{1}s+\beta _{0}}{(s^{2}+\alpha _{1}s+\alpha _{0})(s^{2}+2\zeta \omega _{n}s+\omega _{n}^{2})}\right) \Big |_{s=j\omega _{ck}},\\&y_{k}=\mathfrak {I}\left( -\frac{\beta _{2}s^{2}+\beta _{1}s+\beta _{0}}{(s^{2}+\alpha _{1}s+\alpha _{0})(s^{2}+2\zeta \omega _{n}s+\omega _{n}^{2})}\right) \Big |_{s=j\omega _{ck}}. \end{aligned}$$

where \(k=1,2\). Since the minimum positive critical delay value must be equal to the given delays \(h_{1}\) and \(h_{2}\) respectively for \(\omega _{c1}\) and \(\omega _{c2}\), we have two more constraints:

$$\begin{aligned} {\mathscr {C}}_{3}:h_{1}={\left\{ \begin{array}{ll} \frac{\arctan 2(y_{1},x_{1})}{\omega _{c1}},&{}\text {if }\arctan 2(y_{1},x_{1})\ge 0;\\ \frac{\arctan 2(y_{1},x_{1})+2\pi }{\omega _{c1}},&{}\text {if }\arctan 2(y_{1},x_{1})<0; \end{array}\right. }\\ {\mathscr {C}}_{4}:h_{2}={\left\{ \begin{array}{ll} \frac{\arctan 2(y_{2},x_{2})}{\omega _{c2}},&{}\text {if }\arctan 2(y_{2},x_{2})\ge 0;\\ \frac{\arctan 2(y_{2},x_{2})+2\pi }{\omega _{c2}},&{}\text {if }\arctan 2(y_{2},x_{2})<0. \end{array}\right. } \end{aligned}$$

In order to guarantee the number of crossings M to be 2, we need to make sure (16) has only 2 distinct positive real roots \(\sigma =\omega ^2\) as per Remark 4. Firstly, (16) with \(\sigma =\omega ^{2}\) can be rewritten as:

$$\begin{aligned} \sigma ^{4}+r_{3}\sigma ^{3}+r_{2}\sigma ^{2}+r_{1}\sigma +r_{0}=0 \end{aligned}$$
(17)

where

$$\begin{aligned} r_{3}&=-\left( -4\omega _{n}^{2}\zeta ^{2}-\alpha _{1}^{2}+2\omega _{n}^{2}+2\alpha _{0}\right) \\ r_{2}&=4\alpha _{1}^{2}\omega _{n}^{2}\zeta ^{2}-8\alpha _{0}\omega _{n}^{2}\zeta ^{2}-2\alpha _{1}^{2}\omega _{n}^{2}+\omega _{n}^{4}+4\alpha _{0}\omega _{n}^{2}+\alpha _{0}^{2}-\beta _{2}^{2}\\ r_{1}&=-\left( -4\alpha _{0}^{2}\omega _{n}^{2}\zeta ^{2}-\alpha _{1}^{2}\omega _{n}^{4}+2\alpha _{0}\omega _{n}^{4}+2\alpha _{0}^{2}\omega _{n}^{2}-2\beta _{0}\beta _{2}+\beta _{1}^{2}\right) \\ r_{0}&=\alpha _{0}^{2}\omega _{n}^{4}-\beta _{0}^{2} \end{aligned}$$

Since \(\omega _{c1}^{2}\) and \(\omega _{c2}^{2}\) must be the two roots of (17), one factor of (17) is \((\sigma ^{2}-(\omega _{c1}^{2}+\omega _{c2}^{2})\sigma +\omega _{c1}^{2}\omega _{c2}^{2})\). Then, using factorization in (17), the other factor must be

$$\begin{aligned} \sigma ^{2}+\left( r_{3}+\omega _{c1}^{2}+\omega _{c2}^{2}\right) \sigma +\frac{r_{0}}{\omega _{c1}^{2}\omega _{c2}^{2}} \end{aligned}$$
(18)

To make sure \(M=2\), the zeros of (18) in \(\sigma \) should not be positive. Owing to this, we have to check the discriminant of (18):

$$\begin{aligned} \delta =\left( r_{3}+\omega _{c1}^{2}+\omega _{c2}^{2}\right) ^{2}-\frac{4r_{0}}{\omega _{c1}^{2}\omega _{c2}^{2}} \end{aligned}$$
(19)

The following two scenarios are to be considered:

  1. 1.

    Equation (18) has two complex zeros, that is \(\delta <0\). Denote by \(I_{1}\) the set of all solutions \(\chi \) satisfying \(\delta <0\).

  2. 2.

    Equation (18) has two negative real zeros, that is, \(\delta >0\) & \(r_{3}+\omega _{c1}^{2}+\omega _{c2}^{2}>0\) & \(\frac{r_{0}}{\omega _{c1}^{2}\omega _{c2}^{2}}>0\). In this case, the set of solutions satisfying the three inequalities is denoted by \(I_{2}\).

Consequently, the following constraint guarantees that \(M=2\) holds,

$$\begin{aligned} {\mathscr {C}}_{5}: \chi \in I_{1}\bigcup I_{2} \end{aligned}$$

Remark 5

As per Remark 4, and \(M=2\) based on \({\mathscr {C}}_{5}\), and \(\omega _{c1}>\omega _{c2}\) holds as per Step 1, the crossing directions of \(j\omega _{c1}\) and \(j\omega _{c2}\) are automatically guaranteed and therefore do not need to be explicitly considered. In the case of MIMO problems with commensurate delays, these directions are not necessarily implied and hence must be taken into account explicitly.

Next, from Condition A that the delay-free system is stable, Routh’s array on F(s, 1) in (15) can be implemented, where the Number of Sign (NS) changes in the first column of the array elements determines the number of unstable roots of the system [35]. Thus, for delay-free (\(\tau =0\)) closed-loop system stability this constraint becomes:

$$\begin{aligned} {\mathscr {C}}_{6}: NS=0 \end{aligned}$$

which is formulated specifically for the problem at hand, as:

$$ \begin{aligned}&2\alpha _{0}\omega _{n}\zeta +\alpha _{1}\omega _{n}^{2}+\beta _{1}\\&\quad -\frac{(2\omega _{n}\zeta +\alpha _{1})(\alpha _{0}\omega _{n}^{2}+\beta _{0})}{2\alpha _{1}\omega _{n}\zeta +\omega _{n}^{2}+\alpha _{0}+\beta _{2}-\frac{2\alpha _{0}\omega _{n}\zeta +\alpha _{1}\omega _{n}^{2}+\beta _{1}}{2\omega _{n}\zeta +\alpha _{1}}}>0\\& \& \quad 2\alpha _{1}\omega _{n}\zeta +\omega _{n}^{2}+\alpha _{0}+\beta _{2}-\frac{2\alpha _{0}\omega _{n}\zeta +\alpha _{1}\omega _{n}^{2}+\beta _{1}}{2\omega _{n}\zeta +\alpha _{1}}>0\\& \& \quad \alpha _{0}\omega _{n}^{2}+\beta _{0}>0\\& \& \quad 2\omega _{n}\zeta +\alpha _{1}>0 \end{aligned}$$

For Condition C, where the controller C(s) must be a stable one, the constraint that the roots of the denominator \(s^{2}+\alpha _{1}s+\alpha _{0}\) of C(s) to be in LHP is given by:

$$ \begin{aligned} {\mathscr {C}}_{7}: \alpha _{0}>0\quad \& \quad \alpha _{1}>0 \end{aligned}$$

Finally, from Step 1, we can write down another constraint:

$$\begin{aligned} {\mathscr {C}}_{8}:\omega _{c2}<\omega _{c1} \end{aligned}$$

Now that the constraints \({\mathscr {C}}_{1-8}\) sufficient to satisfy Conditions A–C are established, we next discuss how to compute the controller under these constraints.

4.2 Optimization setup

We now propose to utilize an optimization scheme to calculate C(s) in light of the constraints \({\mathscr {C}}_{1-8}\).

Step 4: fmincon optimization.

To solve for the vector \(\chi =[\omega _{c2}, \alpha _{0}, \alpha _{1}, \beta _{0}, \beta _{1}, \beta _{2}]\) satisfying the above listed constraints, we can consider this design problem as an optimization problem. A solution to \(\chi \) may not exist, and if it does, it may not be unique. Since the aim is to find a solution, multiple solutions are however of no concern.

It can be observed that the type of constraints \({\mathscr {C}}_{1-8}\) we have matches that of the nonlinear optimization toolboxes, namely fmincon tool of Matlab [36]. On the other hand, we so far did not formulate an optimization problem. For this, an objective function f is needed. Among many different ways one can formulate this function, here we propose to minimize the sum of the magnitudes of the coefficients in the controller, that is,

$$\begin{aligned} f=\alpha _{0}^{2}+\alpha _{1}^{2}+\beta _{0}^{2}+\beta _{1}^{2}+\beta _{2}^{2} \end{aligned}$$
(20)

Notice that with the above objective function, it now becomes possible to utilize fmincon tool in Matlab, as explained next.

Since we have a small-medium scale optimization problem with the number of variables < 100, Sequential Quadratic Programming method can be used. In this method, fmincon solves a Quadratic Programming subproblem at each iteration. An estimate of the Hessian of the Lagrangian is updated at each iteration and a line search is performed using a merit function. An active set strategy is used to solve the programming subproblem.

For the implementation of \({\mathscr {C}}_{1-8}\) in the standard form for fmincon active-set algorithm, tolerances for inequality and upper/lower bound constraints must be set. With \(\Delta _{k}\) being small positive values (or vectors with all the entries being small positive values), constraints \({\mathscr {C}}_{1-8}\) are adapted to the optimizer as follows

$$ \begin{aligned}&{\mathscr {C}}_{1}\rightarrow ceq_{1}(\alpha ,\beta )=0 \\&{\mathscr {C}}_{2}\rightarrow ceq_{2}(\chi )=0 \\&{\mathscr {C}}_{3}\rightarrow ceq_{3}(\alpha ,\beta )=0 \\&{\mathscr {C}}_{4}\rightarrow ceq_{4}(\chi )=0 \\&{\mathscr {C}}_{5}\rightarrow c_{1}(\chi )\le -\Delta _{1} \\&{\mathscr {C}}_{6}\rightarrow c_{2}(\alpha ,\beta )\le -\Delta _{2}\quad \& \quad A\cdot \chi \le b -\Delta _{3}\\&{\mathscr {C}}_{7-8}\rightarrow lb+\Delta _{4}\le \chi \le ub-\Delta _{5} \end{aligned}$$

Remark 6

fmincon numerical tool is implemented under several considerations: (i) firstly in the domain of optimization, constraints are assumed to be continuous functions in terms of their arguments; (ii) we have that the obtained result, if any, will be very likely a local minimum; (iii) in general there are no set rules as to how one selects a feasible initial point.

Consideration (i) is neglected here partly because all the constraints, possibly except at some special singularity points, will remain as continuous functions of their arguments. For consideration (ii), since we only care about whether the constraints are satisfied in this problem, the local minimum point \(\chi \) is equally admissible. Finally, we have to pay attention to consideration (iii), in which initial condition could affect whether this optimization method leads to an admissible solution. A rule for selecting an appropriate initial condition is well stated in the Appendix.

Based on the Appendix, a rigorous way of formulating an initial condition follows

where \(\epsilon _{l}\) are small positive values. In other words, with the above proposed initial condition, the characteristic equation in (15) becomes

$$\begin{aligned} F(s,e^{-s\tau })\cong & {} \left( s^{2}+\epsilon _{1}s+(\omega _{c1}-\epsilon _{0})^{2}\right) \left( s^{2}+2\zeta \omega _{n}s+\omega _{n}^{2}\right) \nonumber \\&+\,\epsilon _{2}(s^{2}+s+1)e^{-s\tau } \end{aligned}$$
(21)

The small gains of \(\beta _{k}=\epsilon _{2}\) will not let the time delayed term \(e^{-\tau s}\) render a crossing, and the system is almost marginally stable for a large interval of \(\tau \) due to the factor \(s^{2}+\epsilon _{1}s+(\omega _{c1}-\epsilon _{0})^{2}\).

As we tested, this rule for the initial condition works well for a large interval of \(\omega _{n}\), and for \(\zeta \) from 0 (undamped) to some value above 1 (over-damped); see details in the next section. For some cases, this rule may not work well for undamped systems as this creates potentially an additional crossing at \(\omega _{n}\), violating our design constraints at the very first step of our problem setup. In such cases we may need to propose higher order controllers for C(s), which can be done following the above steps.

Remark 7

In the case when \(m=n\) in (2), we have a neutral class system. For such systems, stability may not be preserved as \(\tau :0\rightarrow 0^{+}\) and could be lost for all \(\tau >0\), even if the delay-free (\(\tau =0\)) system is stable. To prevent this on the LTI SISO system at hand, an additional condition is needed, which is \(|b_{n}|<1\) in (2) [27, 28]. Remainder of the analysis is the same, following Steps 1–4.

4.3 Extensions to higher-order problems

Designing a controller for higher-order open-loop systems that leads to a closed-loop system with two separate stability intervals is even more challenging. This is mainly due to the fact that arising equations are of higher order making it more difficult to keep system crossings under ‘control’. Indeed, inspecting the above design procedure (Steps 1–4), the only step where the assumption of a second-order plant G(s) becomes a key enabler is where factorization and discriminant are used to prevent any additional unwanted crossings in the closed-loop system (see Examples 1, 2 in Sect. 5). By doing so, any unwanted delays are avoided hence it becomes more feasible to attain the intended stable delay intervals.

In the sequel, we discuss two alternatives to the above manipulation where factorization to smaller factors may not be easily established due to the size of the problem. Notice that the design process in Steps 1–4 is primarily concerned with “preventing” additional unwanted crossings. This in some sense is the safest choice, and should be followed when possible (e.g., in the case of low-order problems). On the other hand, the designer has also the option of “allowing” additional unwanted crossings as long as the delay values corresponding to these crossings do not ruin the intended stability intervals along the delay axis. Allowing such crossings simplifies the design as factorization is no longer necessary. Since “prevent” option is already covered in sufficient detail in Steps 1–4, we further discuss the “allow” option next.

4.3.1 Allow additional unwanted crossings

Since two crossings must exist for the intended design, let \(\omega _{c3},\ldots ,\omega _{cv},\ldots ,\omega _{cM}\) be the list of unwanted crossings, where \(\sigma _v = \omega _{cv}^2>0\). Then we have three sets of additional constraints for the optimizer:

  1. (a)

    Allow unwanted crossings but make sure the minimum positive delay value \(\tilde{\tau }_{v}\) corresponding to each crossing is sufficiently large. That is, unwanted \(\tilde{\tau }_{v}\) should occur outside the range of the intended stability intervals. For this, \(\tilde{\tau }_{v}>h_3\) must hold.

  2. (b)

    Let \(\tilde{\tau }_{v} = \epsilon _v + h_3\) with \(\epsilon _v\in {\mathbb {R}}_+\). Since the delay value smaller than the minimum positive delay \(\tilde{\tau }_{v}\) should be negative, \(\tilde{\tau }_{v}-2\pi /\omega _{cv}<0\), we can write \(\epsilon _v + h_3-2\pi /\omega _{cv}<0\) which implies that the unwanted crossings satisfy \(\omega _{cv} < 2\pi /(\epsilon _v + h_3)\). Furthermore, since crossing directions are implied, \(\omega _{c2}\) must be the second largest crossing, hence a stricter condition \(\omega _{cv}<\omega _{c2}\) must hold.

The remaining \(\sigma _v\) roots, \(\sigma _{M+1},\ldots ,\sigma _{m}\), are infeasible for a crossing. For example they can be set as negative quantities, \(\sigma _{v}<0\). Then, one can design a candidate Walton’s equation given by

$$\begin{aligned} \overline{W}(\sigma ) := \prod _{v=1}^{m}(\sigma -\sigma _v) = \sigma ^m + \sum _{k=0}^{m-1}\bar{\ell }_k\sigma ^k, \end{aligned}$$

where \(\sigma _1=\omega _{c1}^2\) is given, and the remaining \(\sigma _v\) are optimization variables. Next, compare this equation with that of Walton’s, \(W(\sigma ) = \sigma ^m + \sum _{k=0}^{m-1}\ell _k\sigma ^k\), which leads to another set of constraints as described next.

  1. (c)

    To attain the desired and unwanted crossings, as well as the infeasible solutions \(\sigma _v\), sign of these solutions must be imposed in the optimization, and the coefficients of Walton’s equation must match with those of the candidate equation, \(|\bar{\ell }_k-\ell _k|=0\), \(k=0,1,\ldots ,m-1\). This imposes a constraint on the nature of the roots of the equation since \(\sigma _v\), \(v\ge 2\), are all optimization variables.

Notice that the above three sets of constraints are not different in structure than those already available in the optimization routine as established in Steps 1–4. The set described in (a) is related to minimum delay formulations already available for \(h_1\) and \(h_2\) (see constraints \({\mathscr {C}}_{3-4}\)). The set described in (b) is similar to the inequality constraint \({\mathscr {C}}_{8}\) considered, and the set in (c) is incorporated as an equality constraint in the solver. In some sense conditions in sets (a), (b) guarantee sparsely repeated delays corresponding to the unwanted crossings, thereby reducing the possibility of these delays interfering with the desired stability intervals, while set (c) gives control over the number of feasible crossings the system could have.

The above approach of safely creating additional unwanted crossings can be over-constraining in some cases since these crossings and their delay values must respect additional conditions. For this reason, optimizing the controller whereby the closed-loop system has many crossings can be more difficult than optimizing for fewer crossings. Hence, the logic line here must be to achieve only the two crossings \(\omega _{c1}\) and \(\omega _{c2}\) as the design requires. In the case the formulations in Steps 1–4 indicate that this cannot be feasible, one would then relax the problem with as fewer number of additional unwanted crossings as possible. An example of this scenario is demonstrated in Example 3 in Section 5 with and without using factorization.

4.3.2 A bottom-up approach with stable pole/zero cancellations

Another option is to take a bottom-up approach where one starts with a “building brick” (e.g., a 2nd order plant G(s) with a PID controller \(C_1(s)\)), and grows the loop transfer function by successively inserting additional controllers \(C_k(s)\), \(k=1,\ldots ,\bar{k}\), into the forward loop. In this approach, the optimization needs to be set up at each step k, and the design process through Steps 1–4 must be re-run while keeping fixed the stability intervals \(\tau \in [0,h_1)\cup (h_2,h_3)\). The main idea here is to first generate a higher-order loop transfer function L(s) = \(G(s)\Pi _{k=1}^{\bar{k}}C_k(s)\) achieving stability for \(\tau \in [0,h_1)\cup (h_2,h_3)\) in the closed loop (see Example 3 in Section 5).

Next, consider that the aim is to design a controller \(\overline{C}(s)\) for a high-order plant transfer function \(\overline{G}(s)\) achieving stability in the closed-loop for \(\tau \in [0,h_1)\cup (h_2,h_3)\). Then, this controller is given by \(\overline{C}(s) = \frac{L(s)}{\overline{G}(s)}\), where care must be taken with the orders of L(s) such that the controller \(\overline{C}(s)\) is proper hence realizable. Moreover, this design approach will work owing to pole/zero cancellations. Hence, one must make sure those cancellations arise only amongst stable poles and zeros, which brings additional constraints both on the plant \(\overline{G}(s)\) and loop transfer function L(s). Needless to say, effects of such cancellations under noise and uncertainties must be thoroughly studied before certifying the controller \(\overline{C}(s)\) for implementation.

5 Example case studies

5.1 Example 1: a computational study

Take \(\zeta =0.7\) and \(\omega _{n}=10\,\hbox {rad}/\hbox {s}\) in G(s) and pick \(h_{1}=0.1\), \(h_{2}=0.5\), \(h_{3}=0.7\) in Condition C (see also Figs. 1 and 2). Following Steps 1–4, constraints \({\mathscr {C}}_{1-8}\) can be incorporated into the fmincon solver in Matlab.

Specifically, in \({\mathscr {C}}_{5}\), we reconstruct the feasible interval of \(I_{1}\bigcup I_{2}\) to simplify the way of expressing the constraints. For the two roots of (18) to become complex conjugate, the following constraint denoted by set \(I_{1}\) must hold,

$$\begin{aligned}&I_{1}{:}\quad \left( 4\omega _{n}^{2}\zeta ^{2}+\alpha _{1}^{2}-2\omega _{n}^{2}-2\alpha _{0}+\omega _{c1}^{2}+\omega _{c2}^{2}\right) ^{2}\\&\quad -\frac{4\left( \alpha _{0}^{2}\omega _{n}^{4}-\beta _{0}^{2}\right) }{\omega _{c1}^{2}\omega _{c2}^{2}}<0 \end{aligned}$$

Then for the two roots of (18) to lie in LHP, two constraints denoted by set \(I_{3}\) must hold as per Routh’s Array,

$$ \begin{aligned}&I_{3}{:}\quad 4\omega _{n}^{2}\zeta ^{2}+\alpha _{1}^{2} -2\omega _{n}^{2}-2\alpha _{0}+\omega _{c1}^{2}+\omega _{c2}^{2}>0\\&\quad \& \quad \frac{\alpha _{0}^{2}\omega _{n}^{4}-\beta _{0}^{2}}{\omega _{c1}^{2}\omega _{c2}^{2}}>0 \end{aligned}$$

Obviously, \(I_{1}\bigcup I_{3}\equiv I_{1}\bigcup I_{2}\), and the above two constraints are inserted into the fmincon solver.

Next, we test whether initial condition works well. Given \(h_{1}\) and \(h_{3}\), we have \(\omega _{c1}=\frac{2\pi }{h_{3}-h_{1}}=10.4720\), then the initial condition becomes

The initial points for \(\omega _{c2}\) and \(\alpha _{0}\) are then put on a grid (\(p \times q\)), and slightly varied,

$$\begin{aligned} \chi _{0}= & {} [10.4720-0.05\times p,\,109.6628-0.1\times q,\\&0,0.01,0.01,0.01] \end{aligned}$$

The optimization is re-run for \(p \times q\) times, where \(p=1,2,\ldots ,20\), \(q=1,2,\ldots ,20\). For these 400 initial points, we find 98.5 % of all the solutions of \(\chi \) converge to the same point \([\omega _{c2},\alpha _{0},\alpha _{1},\beta _{0},\beta _{1},\beta _{2}]=[8.7378, 91.7096, 0.0010\), \(-1.7621,111.457,21.5547]\), while 1.5 % of them converge to different solutions. Moreover, there are no issues with convergence. That is, all 400 runs lead to a feasible solution for \(\chi \).

Fig. 3
figure 3

Example 1: unit step response of the closed loop system simulations at a \(\tau =0\), b \(\tau =0.095\), c \(\tau =0.1\), d \(\tau =0.105\), e \(\tau =0.495\), f \(\tau =0.5\), g \(\tau =0.505\), h \(\tau =0.695\), i \(\tau =0.7\), j \(\tau =0.705\), with the controller C(s) designed using the optimization method described in Sect. 4 and the pre-determined stability decomposition \(\tau \in [0,0.1)\cup (0.5,0.7)\)

The solution \(\chi \) that converge at the highest percentage of 98.5 % is next taken for further study. In this solution, we have \(\omega _{c2}=8.7378\,\hbox {rad}/\hbox {s}\), which is smaller than \(\omega _{c1}\) as expected. Furthermore, these two crossing frequencies signify the oscillation frequency of the closed-loop system output at the critical delays; \(\omega _{c1}\) for \(h_1\) and \(h_3\), and \(\omega _{c2}\) for \(h_2\). We next use the respective controller C(s) in Simulink and run unit step response simulation of the closed-loop system with delay values, \(\tau = 0\), 0.095, 0.1, 0.105, 0.495, 0.5, 0.505, 0.695, 0.7, 0.705 (s). As simulations indicate in Fig. 3, the stability of the delay-free system and the stability boundary of critical delay values match perfectly with the results obtained from the controller design method. Furthermore, in the time window 15–20 s, at the critical values \(\tau =h_1=0.1\) and \(\tau =h_3=0.7\), we observe about 8.25 cycles of oscillations, corresponding to approximately about 10.36 rad/s, which matches with \(\omega _{c1}=10.4720\), and similarly at \(\tau =h_2=0.5\), we observe about 6.75 cycles \(\approx 8.48\,\hbox {rad}/\hbox {s}\), which is very close to the exact solution \(\omega _{c2}=8.7378\).

In order to verify that stability intervals of the closed-loop system match the pre-determined stability “certificates”, rightmost root of the closed-loop characteristic equation is computed using the QPmR toolbox [37] in the interval \(\tau \in (0,1)\). For clarity and relevance, only the real part of the rightmost root \(\mathfrak {R}(s_{RMR})\) is depicted, see Fig. 4, which reveals that the stability intervals match the intended design \(\tau \in [0,0.1)\cup (0.5,0.7)\).

Fig. 4
figure 4

Real part of the rightmost root of the closed-loop system in Example 1 as \(\tau \) varies from 0 to 1 (computed with QPmR toolbox [37])

Remark 8

Notice that the controller designed above has stable poles but close to the imaginary axis due to the small \(\alpha _{1}\) value. This controller works well in the ideal closed-loop model and simulations. However, in the presence of sensor noise that may appear in an experimental system and with possible uncertainties in \(\alpha _1\), e.g., due to digital implementation, this weakly-damped controller may cause internal stability problems [38]. To prevent this, a positive lower bound on \(\alpha _{1}\) can be set as another constraint (see Example 2).

5.2 Example 2: an experimental study

We next implement the controller design approach on a Rotary Servo Base Unit speed-control experiment comprising of a DC-motor with gearbox and a shaft mounted encoder, as shown in Fig. 5. In our experimental setup, the Rotary Servo Base Unit is linked to a computer through a National Instruments data acquisition board supported by QUARC embedded system software using Matlab/Simulink toolbox. A fixed sample period of 0.001 sec and relative tolerance of \(10^{-8}\) are utilized with ODE45 time integration scheme in all the experiments.

For speed control, the model of the DC motor is captured by a first order transfer function (TF) from voltage to motor shaft angular velocity, as

$$\begin{aligned} G_{motor}(s)=\frac{8.4792}{0.028s+1} \end{aligned}$$
(22)

A first-order low-pass filter with cut-off frequency of 50 rad/s is designed to block out the high frequency noise, which is inserted into Simulink at the encoder reading channel,

$$\begin{aligned} G_{filter}(s)=\frac{1}{0.02s+1} \end{aligned}$$
(23)

The open loop TF then becomes a second-order system given by that of the DC motor in series with the filter

$$\begin{aligned} G(s)= & {} G_{motor}(s)G_{filter}(s)\nonumber \\= & {} \frac{15141.375}{s^{2}+85.7143s+1785.715} \end{aligned}$$
(24)

where \(\zeta =1.01419\) and \(\omega _{n}=42.25772\). Consistent with Fig. 2, we define the speed as the output of the filter, and a unity negative feedback with an artificial transport time delay is introduced in the Simulink interface. Furthermore, to be consistent with G(s) in (12) which has a unity gain, we insert a gain of 1 / 15, 141.375 in front of the controller C(s).

Here, we pick \(h_{1}=0.3\), \(h_{2}=1.0\), \(h_{3}=1.8\) in Condition B, and follow Steps 1–4 as was done in Example 1 to bring the constraints into the fmincon solver. Given \(h_{1}\) and \(h_{3}\), we have \(\omega _{c1}=\frac{2\pi }{h_{3}-h_{1}}=4.1888\), hence the initial condition becomes

Fig. 5
figure 5

Experimental setup of Rotary Servo Base Unit with amplifier and data acquisition board

Solution set using this initial condition is computed as \([\omega _{c2},\alpha _{0},\alpha _{1},\beta _{0},\beta _{1},\) \(\beta _{2}]=[3.4992, 15.5508, 0.0010\), 16, 057.60, 853.6112, 891.4406]. This corresponds to the following numerical expression of the controller

$$\begin{aligned} C_{a}(s)=\frac{891.4406s^{2}+853.6112s+16{,}057.60}{15{,}141.375(s^{2}+0.001s+15.5508)} \end{aligned}$$
(25)

Notice that this controller has very low damping \(\alpha _{1}\approx 0\), and therefore may not be appropriate from internal stability point of view. Therefore, we change the constraint on \(\alpha _{1}\), now setting \(\alpha _{1}\ge 0.2\) in our optimization. This yields \([\omega _{c2},\alpha _{0},\alpha _{1},\beta _{0},\beta _{1},\beta _{2}]= [3.2884, 15.0340, 0.2000\), 14, 697.23, 1033.999, 722.7142], revising the numerical expression of the controller to

$$\begin{aligned} C_{b}(s)=\frac{722.7142s^{2}+1033.999s+14{,}697.23}{15{,}141.375(s^{2}+0.2s+15.0340)} \end{aligned}$$
(26)

We next test the validity of the controller using a step input with a gain of 57.52, at \(\tau = 0\), 0.25, 0.3, 0.32, 0.99, 1.0, 1.05, 1.4, 1.8, 1.85 in both simulations and experiments, as shown in Fig. 6. In the figure, we see that except some minimal discrepancies, which may be due to slight variations in DC motor dynamics and nonlinearities, the tendency of curves and stability properties can be clearly observed. Interestingly, at \(\tau =1.4\), when the operating point is inside the second stable interval, the output of the closed-loop system has fairly good settling time and transient characteristics, which is worthy of future study.

Fig. 6
figure 6

Example 2: step response of the motor-shaft angular velocity with controller \(C_{b}(s)\) in both experiments and simulations at delay values a \(\tau =0\), b \(\tau =0.25\), c \(\tau =0.3\), d \(\tau =0.32\), e \(\tau =0.99\), f \(\tau =1.0\), g \(\tau =1.05\), h \(\tau =1.4\), i \(\tau =1.8\), j \(\tau =1.85\) (Experimental data: solid line; Simulation data: dashed line). Experimental results and model predictions are superimposed. Control design procedure utilizes the pre-determined stability decomposition of \(\tau \in [0,0.3)\cup (1.0,1.8)\)

5.3 Example 3: higher-order loop transfer function

The developed controller design approach can also be repeatedly implemented to design cascaded controllers, see also Sect. 4.3.2. Consider the DC motor system in Example 2, where we designed \(C(s)=C_{a}(s)\) in (25). While this controller is sufficient to achieve the design requirements, we now propose to insert a PID controller \(C_{pid}(s)=\frac{k_{d}s^{2}+k_{p}s+k_{i}}{s}\) into the closed-loop, in cascade to \(C_{a}(s)\), as depicted in Fig. 7. In this setting, we aim to tune the PID gains \(k_{p}\), \(k_{i}\) and \(k_{d}\), but we still wish to maintain the same stability intervals as in Example 2. We find out however that \(h_{1}\), \(h_{2}\), \(h_{3}\) values in Example 2 cannot be attained with the addition of the PID controller, mainly because we have only three parameters to design, which are not sufficiently many for the over constrained optimization problem at hand. We therefore set free \(\alpha _{0}\) and \(\alpha _{1}\) in \(C_{a}\), to relax the parameter space.

Fig. 7
figure 7

Model of Example 3

The system shown in Fig. 7 has the following characteristic equation:

$$\begin{aligned}&\left( s^{2}+\alpha _{1}s+\alpha _{0}\right) \left( s^{2}+85.7147s+1785.7149\right) s\nonumber \\&\quad +\,\left( 891.4406s^{2}+853.6112s+16,058\right) \nonumber \\&\quad \times \left( k_{d}s^{2}+k_{p}s+k_{i}\right) e^{-s\tau }=0, \end{aligned}$$
(27)

which can be easily converted to Walton’s equation from (16). Since the constant term in \(W(\omega ^{2})\) function is negative, odd number of positive real roots of \(\sigma =\omega ^{2}\) exists as per Descartes rule of signs [39]. Since \(\omega _{c1}\) and \(\omega _{c2}\) are enforced as crossings, we have at least three crossings in this closed-loop system.

Moreover, we have \(h_{1}\) and \(h_{3}\) assigned to \(\omega _{c1}\), while \(h_{2}\) is associated with \(\omega _{c2}\). Since the function \(W(\omega ^{2})\) is of order-5 with respect to \(\sigma =\omega ^{2}\) , in this case, using factorization in \(W(\omega ^{2})\), we have one factor to be \(\sigma ^{2}-(\omega _{c1}^{2}+\omega _{c2}^{2})\sigma +\omega _{c1}^{2}\omega _{c2}^{2}\), and the other factor is of order-3. Since negative of the discriminant of a \(3^{rd}\) order polynomial indicates one real pole and two complex poles [40], using this condition, we can make sure at most one positive real root exists in the remaining factor, rendering in the worst case one additional unwanted crossing \(\omega _{c3}\). Note that imposing \(\sigma \) to be complex is simple to implement with the help of discriminant. One can alternatively restrict \(\sigma \) from being positive, to rule out the presence of unwanted crossings.

Next, we constraint \(\omega _{c3}\) to be as small as possible such that it does not cause frequent solutions of delay values in (9). For this, we have \(\omega _{c3}<\omega _{c2}\) in the optimization environment. This is done as a necessary condition to prevent those delay values to undesirably interfere with the pre-selected delay intervals \([0,h_{1})\cup (h_{2},h_{3})\), consistent with Sect. 4.3.1. Consequently, we have the order \(\omega _{c1}>\omega _{c2}>\omega _{c3}\) with root crossing directions implied (see Remarks 45) as destabilizing at \(\omega _{c1}\) and \(\omega _{c3}\), and stabilizing at \(\omega _{c2}\).

For sufficiency such that one can guarantee that the two disjoint stability intervals \([0,h_1)\) and \((h_2,h_3)\) are guaranteed to exist in \(\tau \) domain, the minimum positive delay value \(\widetilde{\tau }_{3}\) corresponding to \(\omega _{c3}\) must appear in \(\tau \) domain but at a value greater than \(h_3\). Hence, a constraint is set for this as \(\widetilde{\tau }_{3} > h_{3}\). The minimum positive delay values for \(\omega _{c1}\) and \(\omega _{c2}\) are carried over from Example 2. At last, NS is checked for delay-free closed-loop system stability.

Considering all the above constraints, another fmincon solver is set with a new unknown vector \(\chi =[k_{p},k_{i},k_{d},\alpha _{0},\alpha _{1},\omega _{c2},\omega _{c3}]\). The initial condition is easily extracted from the feasible solution point in Example 2, which is \(kp\rightarrow 1\), \(ki\rightarrow 0\), \(kd\rightarrow 0\), \(\alpha _{0}\rightarrow 15.5508\), \(\alpha _{1}\rightarrow 0.0001\) and \(\omega _{c3}\rightarrow 0\). With the objective function

$$\begin{aligned} f=k_p^2+k_i^2+k_d^2, \end{aligned}$$

the optimization yields the following solution point

$$\begin{aligned} \chi =[1.2412,1.3285,0.0392,15.0702,0.0743,3.0201,1.1784] \end{aligned}$$

rendering \(\omega _{c3} = 1.1784\) relatively small as desired. Moreover, it returns \(\widetilde{\tau }_{3}=2.0620\), which is the smallest delay value for which the system characteristic roots will be on the imaginary axis at \(s=\mp j\omega _{c3}\). This delay value, as designed, is greater than \(h_3=1.8\) and hence does not interfere with the pre-determined stability intervals.

Next, with the PID gains found as \(k_{p}=1.2412\), \(k_{i}=1.3285\), and \(k_{d}=0.0392\), and the controller C(s) as

$$\begin{aligned} C(s)=\frac{891.4406s^{2}+853.6112s+16{,}057.60}{15{,}141.375(s^{2}+0.0743s+15.0702)} \end{aligned}$$

we perform simulations of the closed loop in Fig. 7 in Simulink, which present agreement in system stability with the pre-determined stable delay intervals \(\tau \in [0,0.3)\cup (1,1.8)\) (simulations suppressed to conserve space).

Finally, we remove the factorization condition in the above setting, and instead revisit Sect. 4.3.1 to setup a new optimization problem where constraint sets (a), (b) are implemented and we allow only one additional unwanted crossing \(\omega _{c3}\) hence \(M=3\) in set (c). In light of this setting, we have five coefficients to match since \(m=5\), and moreover the optimization variables are collected by the vector \(\chi =[k_p,k_i,k_d,\alpha _0,\alpha _1,\omega _{c2},\omega _{c3},\sigma _{4},\sigma _{5}]\). The end result using the same optimization function f as above leads to the following optimal solution

$$\begin{aligned}&\chi =[1.0384,0.2282,0.0128,15.4742,0.0015,3.4488,0.1661,\\&\quad -828.3114,-2815.0664] \end{aligned}$$

which indicates that the PID controller gains are given by \(k_p=1.0384, k_i=0.2282, k_d=0.0128\), and the new controller reads

$$\begin{aligned} C(s)=\frac{891.4406s^2+853.6112s+16{,}057.60}{15{,}141.375(s^2+0.0015s+15.4742)} \end{aligned}$$

As designed, the additional crossing \(\omega _{c3}=0.1661\) is less than \(\omega _{c2}\) and moreover its corresponding minimum positive delay value \(\tilde{\tau }_3=13.3599\) (not shown in the above) is larger than \(h_3\). Further, the two solutions \(\sigma _4\) and \(\sigma _5\) generate infeasible crossings as they are both negative as imposed by the structure of candidate Walton’s equation \(\overline{W}\). Implementation of these controllers in Simulink and QPmR validates that indeed the intended stability intervals are achieved.

6 Conclusion

An eigenvalue-based optimization scheme is developed in this article to design controllers for a class of LTI SISO systems subject to delay, with the aim to achieve stability of the closed loop in two pre-determined disjoint intervals along the delay axis. This challenging reverse problem is successfully solved over several examples and demonstrated on an experimental study, offering a strong foundation toward solving more complex problems involving multiple stability intervals. It is critical to note that, driven by applications, control problems are becoming increasingly more complex, involving the design of multiple parameters. While optimization tools to this end were in majority utilized to solve Linear Matrix Inequalities (LMIs) stemming from Lyapunov stability theory, formulation of the control problem in the frequency domain and connecting it with optimization tools offers new opportunities. This was indeed recognized by a recent study [21] where frequency domain conditions of DIS property were tested using LMIs. In future studies, we will focus on extending the proposed method to the case of MIMO systems considering additional constraints as highlighted in Remark 1. We will also systematically investigate the control of unstable open-loop plants following the footprints in [26], and design higher-order controllers for higher-order plants.