Channel statespace #102
baggepinnen
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Extended statespace systems
An
ExtendedStateSpace
system represents a two-input, two-output system.A$w \rightarrow z$ , and 4 closed channels. Each closed channel is closed through an $P$ and all the blocks.
ChannelStateSpace
represents a statespace system with open and closed input-output channels, like the example shown in the block diagram below. There is one open channel,AbstractBlock
. The blocks in the diagram are just examples. TheChannelStateSpace
type represents the entire structure in the block diagram, includingInternally,
ChannelStateSpace
maintains a vector ofIOChannel
s.Channels
An$P$ . A channel has the following properties:
IOChannel
represents a mapping from inputs to outputs through a dynamical systemT
inIOChannel{T}
that specifies the type of the channel.Symbol
) for the entire group of inputsu
, and one name for the group of outputsy
.us
and one vector for the outputsys
.blocks
through which the channel is closed. If the channel is open, this vector is empty.Use
isopen
,isclosed
to figure out if a channel is open or closed.Channels are always sorted internally such that channels that are open are stored first, and closed channels last (technicalities applies, see below). In this way, the
ChannelStateSpace
type can be seen as a specialization ofExtendedStateSpace
where there is an additional partitioning of the two input and output channels.The following channels are defined in this package
A channel does not include the connection and dynamics matrices, i.e., the tuple$A,B,C,D$ , since there are cross terms between channels, like $D_{12}$ in the
ExtendedStateSpace
type, that could not be represented like this. Instead, theChannelStateSpace
maintains an innerExtendedStateSpace
object, and the channels are placed in the upper or lower channel of theExtendedStateSpace
based on their algebraic properties, more on this in Algebraic behavior of channelsBlocks
A closed channel is closed through an
AbstractBlock
. Typical examples includeUncertainElement
.Algebraic behavior of channels
When two systems
s1,s2
are connected in seriess1*s2
, standard statespace systems connect the outputs ofs2
to the inputs ofs1
, and the resulting product system has the outputs ofs1
and the inputs ofs2
. In theChannelStateSpace
type, this type of behavior is represented by theDefaultChannel
. This is an open channel that behaves just like an ordinaryStateSpace
system.Closed-channels, on the other hand, do not behave like this, rather, if two systems with closed channels of the same type are connected in series, the closed channel grows in size to include the input-output mappings of both systems, and the corresponding channel of the product system contains the blocks from both systems.
Typically, open channels behave like the standard
StateSpace
type, and closed channels "append" rather than series, but there are some exceptions:ConstrainedChannel
represents outputs that a constrained to lie within some constraint set, e.g., for MPC applications. AConstrainedChannel
is not closed around anything, and is thus to be considered open, but when two systems are connected, all constrained outputs should be outputs of the connected system.An example of when this situation comes up is given below.
The system$P$ contains measured outputs and constrained outputs, $y$ and $v$ . Some of the inputs $u$ of $P$ are directly fed through to $v$ to indicate input constraints. Loop shaping on $P$ with pre and post-compensators $W_1, W_2$ , forms the system
$$P_s = W_2 P W_1$$ $P$ was a standard $u_s, y_s$ . However, if we have specified constraints on the output $v$ of $P$ , these will in general not hold for the outputs of the scaled plant $P_s$ . Hence, $P_s$ must include the original constrained outputs $v$ among it's outputs.
which, if
StateSpace
, would have new inputs and outputsSince the open/closedness of a channel doesn't always indicate the algebraic properties of a channel, we instead make use of a trait-based solution. Each channel type defines an implementation of the function
algebraic_trait
which returns eitherSeriesTrait
orAppendTrait
, indicating its behavior when systems are multiplied. The innerExtendedStateSpace
of aChannelStateSpace
is thus technically not partitioned based on open and closed channels, rather, it's partitioned based on thealgebraic_trait
.Promotion
Before two systems can interact through algebraic operations, they must be promoted to a common supertype. In this case, the supertype is the
ChannelStateSpace
that contains the union of all the channel types of both systems. The channels that were added in the promotion step are simply empty, i.e., contains no signals and no blocks.LTISystem
objects that are not instances ofChannelStateSpace
are promoted to aChannelStateSpace
with theDefaultChannel
type.LFT on ChannelStateSpace
The literature commonly talks about "upper" and "lower" linear fractional transforms. The terminology upper/lower comes from the TITO system view (
ExtendedStateSpace
) where the lower LFT (lft(P, K, :l)
) closes the lower loop aroundK
. ForChannelStateSpace
types, the terms upper and lower have no meaning since we do no longer have the TITO convention, instead, channels are typed and we refer to the type of the channel we want to close in the LFT, e.g.,lft(P, K, DefaultChannel)
closes the default channel over$K$ . In this scenario, the
DefaultChannel
is a bit special, sinceK
is a regularLTISystem
, the resulting "closed-loop" system no longer has aDefaultChannel
(we never keep standardLTISystem
s as blocks of aChannelStateSpace
). You can only calllft
on open channels, since closed channels are by definition already a closed LFT,lft(P, block, ch)
.Creating ChannelStateSpace
Any
LTISystem
can be converted to aChannelStateSpace
by calling the constructor shorthandcss(sys)
, this gives them aDefaultChannel
. Special kinds ofChannelStateSpace
systems have their own constructors, such as an uncertain statespace model, with the constructoruss
.If you would like to manually create a
ChannelStateSpace
system with specified channels, callwhere
channels::IOChannel...
contain indices into the systemsys
. Indices that are not present in any of thechannels
will be placed in the default channel.Case studies
QUESTION: is
connect
the interface we want, where all subsystems are specified and blocks etc. as well? Avoids having to work out default algebra rules for all channel types, that may or may not align with what people expect. Maybe channles for which it is ambiguous do not have rules defined, instead, all algebra must be done on those before they are added to the ChannelStateSpace. UncertaintyChannel etc. must have algebra defined though, otherwiseW2*P*W1
will not workQUESTION: make the interface such that it works well for when we have a block-diagram editor
Let
sys
denote a system model of typeStateSpace
.Add a performance output to a system model
To add all outputs of
sys
as performance outputs, doto add all inputs to the performance mapping, e.g., indicating references, do
MISC ideas
SHould the continuous-time integrator channel and various discrete-time delay channels also be represented? IF we do, we could represent multi-rate hybrid systems.
Beta Was this translation helpful? Give feedback.
All reactions