@@ -311,28 +311,32 @@ def create_estimator_iosystem(
311
311
sys , QN , RN , P0 = None , G = None , C = None ,
312
312
state_labels = 'xhat[{i}]' , output_labels = 'xhat[{i}]' ,
313
313
covariance_labels = 'P[{i},{j}]' , sensor_labels = None ):
314
- """Create an I/O system implementing a linqear quadratic estimator
314
+ r """Create an I/O system implementing a linear quadratic estimator
315
315
316
316
This function creates an input/output system that implements a
317
317
continuous time state estimator of the form
318
318
319
- \dot xhat = A x + B u - L (C xhat - y)
320
- \dot P = A P + P A^T + F QN F^T - P C^T RN^{-1} C P
321
- L = P C^T RN^{-1}
319
+ .. math::
320
+
321
+ d \hat{x}/dt &= A \hat{x} + B u - L (C \hat{x} - y) \\
322
+ dP/dt &= A P + P A^T + F Q_N F^T - P C^T R_N^{-1} C P \\
323
+ L &= P C^T R_N^{-1}
322
324
323
325
or a discrete time state estimator of the form
324
326
325
- xhat[k + 1] = A x[k] + B u[k] - L (C xhat[k] - y[k])
326
- P[k + 1] = A P A^T + F QN F^T - A P C^T Reps^{-1} C P A
327
- L = A P C^T Reps^{-1}
327
+ .. math::
328
+
329
+ \hat{x}[k+1] &= A \hat{x}[k] + B u[k] - L (C \hat{x}[k] - y[k]) \\
330
+ P[k+1] &= A P A^T + F Q_N F^T - A P C^T R_e^{-1} C P A \\
331
+ L &= A P C^T R_e^{-1}
328
332
329
- where Reps = RN + C P C^T. It can be called in the form
333
+ where :math:`R_e = R_N + C P C^T` . It can be called in the form::
330
334
331
335
estim = ct.create_estimator_iosystem(sys, QN, RN)
332
336
333
- where `` sys`` is the process dynamics and QN and RN are the covariance
337
+ where `sys` is the process dynamics and `QN` and `RN` are the covariance
334
338
of the disturbance noise and sensor noise. The function returns the
335
- estimator `` estim`` as I/O system with a parameter `` correct` ` that can
339
+ estimator `estim` as I/O system with a parameter `correct` that can
336
340
be used to turn off the correction term in the estimation (for forward
337
341
predictions).
338
342
@@ -356,8 +360,8 @@ def create_estimator_iosystem(
356
360
{state, covariance, sensor, output}_labels : str or list of str, optional
357
361
Set the name of the signals to use for the internal state, covariance,
358
362
sensors, and outputs (state estimate). If a single string is
359
- specified, it should be a format string using the variable ``i` ` as an
360
- index (or ``i`` and ``j` ` for covariance). Otherwise, a list of
363
+ specified, it should be a format string using the variable `i ` as an
364
+ index (or `i` and `j ` for covariance). Otherwise, a list of
361
365
strings matching the size of the respective signal should be used.
362
366
Default is ``'xhat[{i}]'`` for state and output labels, ``'y[{i}]'``
363
367
for output labels and ``'P[{i},{j}]'`` for covariance labels.
@@ -372,18 +376,18 @@ def create_estimator_iosystem(
372
376
Notes
373
377
-----
374
378
This function can be used with the ``create_statefbk_iosystem()`` function
375
- to create a closed loop, output-feedback, state space controller:
379
+ to create a closed loop, output-feedback, state space controller::
376
380
377
381
K, _, _ = ct.lqr(sys, Q, R)
378
382
est = ct.create_estimator_iosystem(sys, QN, RN, P0)
379
383
ctrl, clsys = ct.create_statefbk_iosystem(sys, K, estimator=est)
380
384
381
- The estimator can also be run on its own to process a noisy signal:
385
+ The estimator can also be run on its own to process a noisy signal::
382
386
383
387
resp = ct.input_output_response(est, T, [Y, U], [X0, P0])
384
388
385
389
If desired, the ``correct`` parameter can be set to ``False`` to allow
386
- prediction with no additional sensor information:
390
+ prediction with no additional sensor information::
387
391
388
392
resp = ct.input_output_response(
389
393
est, T, 0, [X0, P0], param={'correct': False)
0 commit comments