@@ -74,16 +74,16 @@ The system `sys` can be continuous or discrete-time (`Ts` can be omitted for the
74
74
For continuous dynamics, its state-space equations are (discrete case in Extended Help):
75
75
```math
76
76
\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)
79
79
\e nd{aligned}
80
80
```
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
82
82
comprises 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`,
84
84
the measured disturbances. The constructor automatically discretizes continuous systems,
85
85
resamples 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).
87
87
The rest of the documentation assumes discrete models since all systems end up in this form.
88
88
89
89
See also [`ss`](@extref ControlSystemsBase.ss)
@@ -112,8 +112,8 @@ LinModel with a sample time Ts = 0.1 s:
112
112
The state-space equations are similar if `sys` is discrete-time:
113
113
```math
114
114
\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)
117
117
\e nd{aligned}
118
118
```
119
119
Continuous dynamics are internally discretized using [`c2d`](@extref ControlSystemsBase.c2d)
@@ -124,16 +124,21 @@ LinModel with a sample time Ts = 0.1 s:
124
124
Note that the constructor transforms the system to its minimal and balancing realization
125
125
using [`minreal`](@extref ControlSystemsBase.minreal) for controllability/observability.
126
126
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:
129
128
```math
130
129
\b egin{aligned}
131
130
\m athbf{x}(k+1) &= \m athbf{A x}(k) + \m athbf{B_u u}(k) + \m athbf{B_d d}(k) \\
132
131
\m athbf{y}(k) &= \m athbf{C x}(k) + \m athbf{D_d d}(k)
133
132
\e nd{aligned}
134
133
```
135
134
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.
137
142
"""
138
143
function LinModel (
139
144
sys:: StateSpace{E, NT} ,
194
199
195
200
Convert to minimal realization state-space when `sys` is a transfer function.
196
201
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.
199
204
200
205
See also [`tf`](@extref ControlSystemsBase.tf)
201
206
0 commit comments