@@ -147,14 +147,15 @@ ctrb(sys::StateSpace) = ctrb(sys.A, sys.B)
147
147
148
148
""" `P = covar(sys, W)`
149
149
150
- Calculate the stationary covariance `P = E[y(t)y(t)']` of an lti-model `sys`, driven by gaussian
151
- white noise 'w' of covariance `E[w(t)w(τ)]=W*δ(t-τ)` where δ is the dirac delta.
150
+ Calculate the stationary covariance `P = E[y(t)y(t)']` of the output `y` of a
151
+ `StateSpace` model `sys` driven by white Gaussian noise `w` with covariance
152
+ `E[w(t)w(τ)]=W*δ(t-τ)` (δ is the Dirac delta).
152
153
153
- The ouput is if Inf if the system is unstable. Passing white noise directly to
154
- the output will result in infinite covariance in the corresponding outputs
155
- (D*W*D' .!= 0) for contunuous systems."""
154
+ Remark: If `sys` is unstable then the resulting covariance is a matrix of `Inf`s.
155
+ Entries corresponding to direct feedthrough (D*W*D' .!= 0) will equal `Inf`
156
+ for continuous-time systems."""
156
157
function covar (sys:: AbstractStateSpace , W)
157
- (A, B, C, D) = (sys. A, sys . B, sys . C, sys . D )
158
+ (A, B, C, D) = ssdata (sys)
158
159
if ! isa (W, UniformScaling) && (size (B,2 ) != size (W, 1 ) || size (W, 1 ) != size (W, 2 ))
159
160
error (" W must be a square matrix the same size as `sys.B` columns" )
160
161
end
@@ -170,9 +171,9 @@ function covar(sys::AbstractStateSpace, W)
170
171
P = C* Q* C'
171
172
if iscontinuous (sys)
172
173
# Variance and covariance infinite for direct terms
173
- directNoise = D* W* D'
174
+ direct_noise = D* W* D'
174
175
for i in 1 : size (C,1 )
175
- if directNoise [i,i] != 0
176
+ if direct_noise [i,i] != 0
176
177
P[i,:] .= Inf
177
178
P[:,i] .= Inf
178
179
end
@@ -199,22 +200,16 @@ covar(C::Union{AbstractMatrix,UniformScaling}, R) = C*R*C'
199
200
200
201
`norm(sys)` or `norm(sys,2)` computes the H2 norm of the LTI system `sys`.
201
202
202
- `norm(sys, Inf)` computes the L ∞ norm of the LTI system `sys`.
203
- The H∞ norm is the same as the L ∞ for stable systems, and Inf for unstable systems.
203
+ `norm(sys, Inf)` computes the H ∞ norm of the LTI system `sys`.
204
+ The H∞ norm is the same as the H ∞ for stable systems, and Inf for unstable systems.
204
205
If the peak gain frequency is required as well, use the function `hinfnorm` instead.
206
+ See [`hinfnorm`](@ref) for further documentation.
205
207
206
208
`tol` is an optional keyword argument, used only for the computation of L∞ norms.
207
209
It represents the desired relative accuracy for the computed L∞ norm
208
210
(this is not an absolute certificate however).
209
211
210
- sys is first converted to a state space model if needed.
211
-
212
- The L∞ norm computation implements the 'two-step algorithm' in:
213
- N.A. Bruinsma and M. Steinbuch, 'A fast algorithm to compute the H∞-norm
214
- of a transfer function matrix', Systems and Control Letters 14 (1990), pp. 287-293.
215
- For the discrete-time version, see, e.g.,: P. Bongers, O. Bosgra, M. Steinbuch, 'L∞-norm
216
- calculation for generalized state space systems in continuous and discrete time',
217
- American Control Conference, 1991.
212
+ `sys` is first converted to a `StateSpace` model if needed.
218
213
"""
219
214
function LinearAlgebra. norm (sys:: AbstractStateSpace , p:: Real = 2 ; tol= 1e-6 )
220
215
if p == 2
@@ -225,10 +220,8 @@ function LinearAlgebra.norm(sys::AbstractStateSpace, p::Real=2; tol=1e-6)
225
220
error (" `p` must be either `2` or `Inf`" )
226
221
end
227
222
end
223
+ LinearAlgebra. norm (sys:: TransferFunction , p:: Real = 2 ; tol= 1e-6 ) = norm (ss (sys), p, tol= tol)
228
224
229
- function LinearAlgebra. norm (sys:: TransferFunction , p:: Real = 2 ; tol= 1e-6 )
230
- return norm (ss (sys), p, tol= tol)
231
- end
232
225
233
226
"""
234
227
` (Ninf, ω_peak) = hinfnorm(sys; tol=1e-6)`
@@ -244,14 +237,15 @@ the computed H∞ norm (not an absolute certificate).
244
237
245
238
`sys` is first converted to a state space model if needed.
246
239
247
- The L∞ norm computation implements the 'two-step algorithm' in:
248
- N.A. Bruinsma and M. Steinbuch, 'A fast algorithm to compute the H∞-norm
249
- of a transfer function matrix', Systems and Control Letters 14 (1990), pp. 287-293.
250
- For the discrete-time version, see: P. Bongers, O. Bosgra, M. Steinbuch, 'L∞-norm
251
- calculation for generalized state space systems in continuous and discrete time',
252
- American Control Conference, 1991.
240
+ The continuous-time L∞ norm computation implements the 'two-step algorithm' in:\\
241
+ **N.A. Bruinsma and M. Steinbuch**, 'A fast algorithm to compute the H∞-norm of
242
+ a transfer function matrix', Systems and Control Letters (1990), pp. 287-293.
253
243
254
- See also `linfnorm`.
244
+ For the discrete-time version, see:\\
245
+ **P. Bongers, O. Bosgra, M. Steinbuch**, 'L∞-norm calculation for generalized
246
+ state space systems in continuous and discrete time', American Control Conference, 1991.
247
+
248
+ See also [`linfnorm`](@ref).
255
249
"""
256
250
function hinfnorm (sys:: AbstractStateSpace ; tol= 1e-6 )
257
251
if iscontinuous (sys)
@@ -275,14 +269,15 @@ the computed L∞ norm (this is not an absolute certificate however).
275
269
276
270
`sys` is first converted to a state space model if needed.
277
271
278
- The L∞ norm computation implements the 'two-step algorithm' in:
279
- N.A. Bruinsma and M. Steinbuch, 'A fast algorithm to compute the H∞-norm
280
- of a transfer function matrix', Systems and Control Letters 14 (1990), pp. 287-293.
281
- For the discrete-time version, see:
282
- P. Bongers, O. Bosgra, M. Steinbuch, 'L∞-norm calculation for generalized state
283
- space systems in continuous and discrete time', American Control Conference, 1991.
272
+ The continuous-time L∞ norm computation implements the 'two-step algorithm' in:\\
273
+ **N.A. Bruinsma and M. Steinbuch**, 'A fast algorithm to compute the H∞-norm of
274
+ a transfer function matrix', Systems and Control Letters (1990), pp. 287-293.
275
+
276
+ For the discrete-time version, see:\\
277
+ **P. Bongers, O. Bosgra, M. Steinbuch**, 'L∞-norm calculation for generalized
278
+ state space systems in continuous and discrete time', American Control Conference, 1991.
284
279
285
- See also `hinfnorm`.
280
+ See also [ `hinfnorm`](@ref) .
286
281
"""
287
282
function linfnorm (sys:: AbstractStateSpace ; tol= 1e-6 )
288
283
if iscontinuous (sys)
0 commit comments