PSS Common Module
MATLAB toolboxes for aerospace analysis
statespace.m File Reference

PSS internal file version information. More...

Functions

function statespace (in a, in b, in c, in d, in name, in states, in inputs, in outputs, in sType, in dT)
 Create a state space object. More...
 
function and (in e, in f)
 Strings. More...
 
function close (in h, in e)
 PSS internal file version information. More...
 
function connect (in e, in f, in c)
 PSS internal file version information. More...
 
function eig (in g)
 e -> f More...
 
function get (in x, in s)
 PSS internal file version information. More...
 
function getabcd (in x)
 PSS internal file version information. More...
 
function getsub (in x, in kS, in kI, in kO, in name)
 PSS internal file version information. More...
 
function isempty (in x)
 PSS internal file version information. More...
 
function plus (in e, in f)
 PSS internal file version information. More...
 
function series (in e, in f, in m)
 PSS internal file version information. More...
 
function set (in x, in y, in s)
 Set an element of the class statespace. More...
 

Detailed Description

PSS internal file version information.


Copyright (c) 1997-1998 Princeton Satellite Systems, Inc. All rights reserved.



Date
2015-01-15
Revision
8fdf9a329962b7113ca51ebe27ec9155ace5d8a7

Set an element of the class statespace

Function Documentation

◆ and()

function and ( in  e,
in  f 
)

Strings.


Copyright (c) 1997-1998 Princeton Satellite Systems, Inc. All rights reserved.




Date
2020-05-26
Revision
1d2deb80aee60c081797f14b7db80dc337300b89

Append two state space system

[ e ]
[ f ]

Form

g = and( e, f )


Inputs

e           (:)   Object of class statespace
f           (:)   Object of class statespace

Outputs

g           (:)   Appended

◆ close()

function close ( in  h,
in  e 
)

PSS internal file version information.


Copyright (c) 1997 Princeton Satellite Systems, Inc. All rights reserved.



Date
2015-01-15
Revision
8fdf9a329962b7113ca51ebe27ec9155ace5d8a7

Close the loop on a statespace control system.

e relates y to u.
u = -ey

Form

g = close( h, e )


Inputs

h           (:)   Object of class statespace
e           (:)   Connection matrix

Outputs

g           (:)   Closed loop system

◆ connect()

function connect ( in  e,
in  f,
in  c 
)

PSS internal file version information.


Copyright (c) 2000 Princeton Satellite Systems, Inc. All rights reserved.



Date
2015-01-15
Revision
8fdf9a329962b7113ca51ebe27ec9155ace5d8a7

Connection of two state space systems. The connection is

e -> f


The connection matrix is lists the indices of the matching outputs
of e and inputs of f. For example


u       (4,1)           y (3,1)
f                       e


c might be [1 1;1 3] which means that output 1 of y goes into input 1
of u. Output 3 of y also goes into 1 of u.


c is [uF;yE]


Empty c implies parallel connection with separate inputs and outputs:


-------
  • | f | –


  • | e | –


Form

g = connect( e, f, c )


Inputs

e           (:)     Object of class statespace
f           (:)     Object of class statespace
c           (:,2)   Connection matrix

Outputs

g           (:)   Series connection

◆ eig()

function eig ( in  g)

e -> f


Copyright (c) 2000 Princeton Satellite Systems, Inc. All rights reserved.



Assemble the matrices


Assemble the names


PSS internal file version information


Date
2015-01-15
Revision
8fdf9a329962b7113ca51ebe27ec9155ace5d8a7

Get the eigenvalues of a statespace system.


Form

[v, s] = eig( g )


Inputs

e           (:)   Object of class statespace

Outputs

v           (:)   Eigenvectors
s           (:)   Eigenvalues

◆ get()

function get ( in  x,
in  s 
)

PSS internal file version information.


Copyright (c) 1999 Princeton Satellite Systems, Inc. All rights reserved.



Date
2015-01-15
Revision
8fdf9a329962b7113ca51ebe27ec9155ace5d8a7

Get an element of the class statespace


Form

y = get( x, s )


Inputs

x           (:)   Object of class statespace
s           (1,:) Element of class statespace

Outputs

y           (:)   Output

◆ getabcd()

function getabcd ( in  x)

PSS internal file version information.


Copyright (c) 1997 Princeton Satellite Systems, Inc. All rights reserved.



Date
2015-01-15
Revision
8fdf9a329962b7113ca51ebe27ec9155ace5d8a7

Get the state space matrices


Form

[a, b, c, d] = getabcd( x )


Inputs

x           (:)   Object of class statespace

Outputs

a           (:)   State matrix
b           (:)   Input matrix
c           (:)   Output matrix
d           (:)   Feedthrough matrix

◆ getsub()

function getsub ( in  x,
in  kS,
in  kI,
in  kO,
in  name 
)

PSS internal file version information.


Copyright (c) 1997 Princeton Satellite Systems, Inc. All rights reserved.



Date
2015-01-15
Revision
8fdf9a329962b7113ca51ebe27ec9155ace5d8a7

Get the state space matrices


Form

g = getsub( x, kS, kI, kO, name )


Inputs

x           (:)   Object of class statespace
kS          (1,:) States
kI          (1,:) Inputs
kO          (1,:) Outputs
name        (1,:) Name

Outputs

g           (:)   Object of class statespace

◆ isempty()

function isempty ( in  x)

PSS internal file version information.


Copyright (c) 1997 Princeton Satellite Systems, Inc. All rights reserved.



Date
2015-01-15
Revision
8fdf9a329962b7113ca51ebe27ec9155ace5d8a7

Determine if x is an empty statespace system.


Form

k = isempty( x )


Inputs

x           (:)   Object of class statespace

Outputs

k           (1,1) 1 if empty 

◆ plus()

function plus ( in  e,
in  f 
)

PSS internal file version information.


Copyright (c) 2000 Princeton Satellite Systems, Inc. All rights reserved.



Date
2015-01-15
Revision
8fdf9a329962b7113ca51ebe27ec9155ace5d8a7

Parallel connection of two state space systems.

The connection is
[ e ]
[ f ]

Form

g = plus( e, f )


Inputs

e           (:)   Object of class statespace
f           (:)   Object of class statespace

Outputs

g           (:)   Parallel connection

◆ series()

function series ( in  e,
in  f,
in  m 
)

PSS internal file version information.


Copyright (c) 1997 Princeton Satellite Systems, Inc. All rights reserved.



Date
2015-01-15
Revision
8fdf9a329962b7113ca51ebe27ec9155ace5d8a7

Connection of two state space systems.

The connection is

e -> f

The connection matrix is lists the indices of the matching outputs of e and inputs of f. For example:

u       (4,1)           y (3,1)
f                       e

c might be [1 1;1 3] which means that output 1 of y goes into input 1 of u. Output 3 of y also goes into 1 of u.


Form

g = series( e, f, c )


Inputs

e           (:)     Object of class statespace
f           (:)     Object of class statespace
m           (:,2)   Connection matrix

Outputs

g           (:)     Series connection

◆ set()

function set ( in  x,
in  y,
in  s 
)

Set an element of the class statespace.


Copyright (c) 2000,2005 Princeton Satellite Systems, Inc. All rights reserved.



Date
2020-05-27
Revision
b67f1a5afda3a5ee7769b256063a4988934cde3e

Form

x = set( x, y, s )


Inputs

x           (:)   Object of class statespace
y           (:)   Value of element
s           (1,:) Element of class statespace

Outputs

x           (:)   Object of class statespace

Referenced by PlaybackControls(), and SliderBar().

◆ statespace()

function statespace ( in  a,
in  b,
in  c,
in  d,
in  name,
in  states,
in  inputs,
in  outputs,
in  sType,
in  dT 
)

Create a state space object.

Everything after c is optional.

dx/dt = ax + bu
y = cx + du

Form

g = statespace( a, b, c, d, name, states, inputs, outputs, sType, dT )


Inputs

a                          State transition matrix
b                          State input matrix
c                          State output matrix
d                          State feedthrough matrix
name     (1,:)             Name of the system
states   (:,:)   or {:}    State  names
inputs   (:,:)   or {:}    Input names
outputs  (:,:)   or {:}    Outputs
sType    (1,:)             's', 'z', 'delta' 
dT       (1,1)             Time step

Outputs

g             (:)     Plant
g.a       State transition matrix
g.b       State input matrix
g.c       State output matrix
g.d       State feedthrough matrix
g.n       Number of states
g.nI      Number of inputs
g.nO      Number of outputs
g.states  Names of states
g.inputs  Names of inputs
g.outputs Names of outputs
g.sType   's', 'z', 'delta' 
g.dT      Time step