Documentation Center

  • Trial Software
  • Product Updates

rss

Generate random continuous test model

Syntax

rss(n)
rss(n,p)
rss(n,p,m,s1,...,sn)

Description

rss(n) generates an n-th order model with one input and one output and returns the model in the state-space object sys. The poles of sys are random and stable with the possible exception of poles at s = 0 (integrators).

rss(n,p) generates an nth order model with one input and p outputs, and rss(n,p,m) generates an n-th order model with m inputs and p outputs. The output sys is always a state-space model.

rss(n,p,m,s1,...,sn) generates an s1-by-...-by-sn array of n-th order state-space models with m inputs and p outputs.

Use tf, frd, or zpk to convert the state-space object sys to transfer function, frequency response, or zero-pole-gain form.

Examples

Obtain a random continuous LTI model with three states, two inputs, and two outputs by typing

sys = rss(3,2,2)
a = 
                        x1           x2           x3
           x1     -0.54175      0.09729      0.08304
           x2      0.09729     -0.89491      0.58707
           x3      0.08304      0.58707     -1.95271
 
b = 
                        u1           u2
           x1     -0.88844     -2.41459
           x2            0     -0.69435
           x3     -0.07162     -1.39139
 
c = 
                        x1           x2           x3
           y1      0.32965      0.14718            0
           y2      0.59854     -0.10144      0.02805
 
 
d = 
                        u1           u2
           y1     -0.87631     -0.32758
           y2            0            0
 
Continuous-time system.

See Also

| | |

Was this topic helpful?