@@ -74,16 +74,16 @@ The system `sys` can be continuous or discrete-time (`Ts` can be omitted for the
7474For continuous dynamics, its state-space equations are (discrete case in Extended Help):
7575```math
7676\b egin{aligned}
77- \m athbf{ẋ}(t) &= \m athbf{A x}(t) + \m athbf{B z }(t) \\
78- \m athbf{y}(t) &= \m athbf{C x}(t) + \m athbf{D z }(t)
77+ \m athbf{ẋ}(t) &= \m athbf{A x}(t) + \m athbf{B s }(t) \\
78+ \m athbf{y}(t) &= \m athbf{C x}(t) + \m athbf{D s }(t)
7979\e nd{aligned}
8080```
81- with the state ``\m athbf{x}`` and output ``\m athbf{y}`` vectors. The ``\m athbf{z }`` vector
81+ with the state ``\m athbf{x}`` and output ``\m athbf{y}`` vectors. The ``\m athbf{s }`` vector
8282comprises the manipulated inputs ``\m athbf{u}`` and measured disturbances ``\m athbf{d}``,
83- in any order. `i_u` provides the indices of ``\m athbf{z }`` that are manipulated, and `i_d`,
83+ in any order. `i_u` provides the indices of ``\m athbf{s }`` that are manipulated, and `i_d`,
8484the measured disturbances. The constructor automatically discretizes continuous systems,
8585resamples discrete ones if `Ts ≠ sys.Ts`, computes a new balancing and minimal state-space
86- realization, and separates the ``\m athbf{z }`` terms in two parts (details in Extended Help).
86+ realization, and separates the ``\m athbf{s }`` terms in two parts (details in Extended Help).
8787The rest of the documentation assumes discrete models since all systems end up in this form.
8888
8989See also [`ss`](@extref ControlSystemsBase.ss)
@@ -112,8 +112,8 @@ LinModel with a sample time Ts = 0.1 s:
112112 The state-space equations are similar if `sys` is discrete-time:
113113 ```math
114114 \b egin{aligned}
115- \m athbf{x}(k+1) &= \m athbf{A x}(k) + \m athbf{B z }(k) \\
116- \m athbf{y}(k) &= \m athbf{C x}(k) + \m athbf{D z }(k)
115+ \m athbf{x}(k+1) &= \m athbf{A x}(k) + \m athbf{B s }(k) \\
116+ \m athbf{y}(k) &= \m athbf{C x}(k) + \m athbf{D s }(k)
117117 \e nd{aligned}
118118 ```
119119 Continuous dynamics are internally discretized using [`c2d`](@extref ControlSystemsBase.c2d)
@@ -124,16 +124,21 @@ LinModel with a sample time Ts = 0.1 s:
124124 Note that the constructor transforms the system to its minimal and balancing realization
125125 using [`minreal`](@extref ControlSystemsBase.minreal) for controllability/observability.
126126 As a consequence, the final state-space representation will be presumably different from
127- the one provided in `sys`. It is also converted into a more practical form
128- (``\m athbf{D_u=0}`` because of the zero-order hold):
127+ the one provided in `sys`. It is also converted into a more practical form:
129128 ```math
130129 \b egin{aligned}
131130 \m athbf{x}(k+1) &= \m athbf{A x}(k) + \m athbf{B_u u}(k) + \m athbf{B_d d}(k) \\
132131 \m athbf{y}(k) &= \m athbf{C x}(k) + \m athbf{D_d d}(k)
133132 \e nd{aligned}
134133 ```
135134 Use the syntax [`LinModel{NT}(A, Bu, C, Bd, Dd, Ts)`](@ref) to force a specific
136- state-space representation.
135+ state-space representation.
136+
137+ It is assumed that ``\m athbf{D_u=0}`` (or `sys` is strictly proper) since otherwise the
138+ resulting discrete controller is acausal by definition. Indeed, all discrete controllers
139+ (1) sample an output ``\m athbf{y}(k)`` from the plant, (2) computes an action
140+ ``\m athbf{u}(k)`` and (3) apply the action on the plant. There is a causality paradox
141+ if ``\m athbf{u}(k)`` impacts ``\m athbf{y}(k)`` even before computing it.
137142"""
138143function LinModel (
139144 sys:: StateSpace{E, NT} ,
194199
195200Convert to minimal realization state-space when `sys` is a transfer function.
196201
197- `sys` is equal to ``\f rac{\m athbf{y}(s)}{\m athbf{z }(s)}`` for continuous-time, and
198- ``\f rac{\m athbf{y}(z)}{\m athbf{z }(z)}``, for discrete-time.
202+ `sys` is equal to ``\f rac{\m athbf{y}(s)}{\m athbf{s }(s)}`` for continuous-time, and
203+ ``\f rac{\m athbf{y}(z)}{\m athbf{s }(z)}``, for discrete-time.
199204
200205See also [`tf`](@extref ControlSystemsBase.tf)
201206
0 commit comments