It frequently happens that one would like to implement control-switching schemes to facilitate changing modes, where different controller are subsequently active with the aim to achieve different objectives. Many of such control implementations can be subsumed as shown in the following interconnection.

Here is the plant to be controlled, while
,
, represents the control switching scheme (i.e. for
controller
is active, while for
controller
is active). Here
is a time-varying parameter that in practice is often switched from 0 to 1 in an instantaneous manner. In other more careful implementations, the parameter
is slowly varied for 0 to 1 to facilitate a smoother transitioning between the different controllers.
There are a few issues with this approach:
- An instantaneous switch may cause significant disruptions in the closed loop system. The effect is similar to recovering from a nonzero initial condition.
- For smoother implementations, where
is varied slowly from 0 to 1, it is unknown if the closed loop system is guaranteed to be stable. This is certainly a problem if either one of the controllers is unstable.
A Youla based solution
To resolve the latter issues, one can proceed according to the approach suggested in [11], [12]. This proceeds as follows.
Let be a proper LTI system that admits the realization




This can be done using the function fCoprime (details). Given and the eight transfer matrices that satisfy the Bezout identity, one then can arrive at an entire family of controllers that internally stabilize
.
This parameterization is given by


Note that can also be written as a lower LFT of some fixed transfer matrix
and the Youla parameter
:










When is fixed for all
, the Youla parameter
is stable, which also implies that the control interconnection of the latter figure is stable. Hence, for any trajectory
during the switching phase, the resulting controller can be regarded as a linear time varying system. In [11] it is shown that also for this case, the closed-loop system will remain stable.
Note in case is already stable, i.e.,
, then the matrices in the Bezout identity may be taken as:
,
In this case, we obtain with the Youla parameter
.
Implementation
The function implements the described procedure. Here:
is the part of the plant seen by the controller. This realization must be stabilizable and detectable.
- The controllers
,
, which both stabilize
.
As output this yields:
- The transfer matrix
with realization
- The structure
with the Youla parameters
.
These can be interconnected as in accordance with the figure above, or, in case of more than two controllers as
with
.
Note: The algorithms works for continuous- as well as discrete-time systems.
Demonstrating example
A demonstration of this procedure is found here.