prescale
Scale a state-space model.
Syntax
[SYSOUT, INFO] = prescale(SYSIN)
Inputs
- SYSIN
- A state-space model.
Outputs
- SYSOUT
- A scaled state-space model.
- INFO
- A struct containing the left and right scale factors SL and SR.
Examples
A = [ -1 0 0 0.003;
0 0 0.1000 0.02;
100 10 0 0.4;
0 0 0 0.0];
B = [ 10 0;
0 0;
0 1000;
10000 10000];
C = [ -0.1 0.0 0.001 0.0;
0.0 0.01 -0.001 0.0001];
D = [];
E = [ 1 0.2 0 0.0;
0 1 0 0.01;
300 90 6 0.3;
0 0 20 0.0];
sysIn = dss (A, B, C, D, E);
[sysOut, info] = prescale(sysIn)
sysOut = object [
Scaled: 0
TimeUnit: seconds
ts: 0
a: [Matrix] 4 x 4
-1.00000 0.00000 0.00000 0.30000
0.00000 0.00000 1.00000 2.00000
1.00000 0.10000 0.00000 0.40000
0.00000 0.00000 0.00000 0.00000
b: [Matrix] 4 x 2
100 0
0 0
0 100
100 100
c: [Matrix] 2 x 4
-0.01000 0.00000 0.00100 0.00000
0.00000 0.00100 -0.00100 0.00100
d: [Matrix] 2 x 2
0 0
0 0
e: [Matrix] 4 x 4
1.00000 0.20000 0.00000 0.00000
0.00000 1.00000 0.00000 1.00000
3.00000 0.90000 0.60000 0.30000
0.00000 0.00000 0.20000 0.00000
type: StateSpaceModel
]
info = object [
SL: [Matrix] 4 x 1
10.00000
10.00000
0.10000
0.01000
SR: [Matrix] 4 x 1
0.10000
0.10000
1.00000
10.00000
]
sys_tf = tf([1],[2 9 1]);
sysIn = ss(sys_tf);
[sysOut, info] = prescale(sysIn)
sysOut = object [
Scaled: 0
TimeUnit: seconds
ts: 0
a: [Matrix] 2 x 2
-4.50000 -0.50000
1.00000 0.00000
b: [Matrix] 2 x 1
0.50000
0.00000
c: [Matrix] 1 x 2
0 1
d: 0
e: [Matrix] 0 x 0
type: StateSpaceModel
]
info = object [
SL: [Matrix] 2 x 1
1
1
SR: [Matrix] 2 x 1
1
1
]
Comments
The function scales a state-space model. The returned scaled model is equivalent to SYSIN.
- SL
- Left scaling factors.
- SR
- Right scaling factors.
- As = Tl * A * Tr
- Bs = Tl * B
- Cs = C * Tr
- Ds = D
- Es = Tl * E * Tr
- Tl = diag(info.SL)
- Tr = diag(info.SR)
Tl and Tr are inverses if the system is a proper state-space model.
Based on SLICOT library functions tb01id and tg01ad.