206 Chapter 6. Function Reference
Reference
B.C. Moore, “Principal Component Analysis in Linear Systems: Controllability,
Observability and Model Reduction,” IEEE Trans.Auto. Ctrl., Vol. 26, No. 1, pp. 17–32,
Feb.1981.
Example
# Create a five state system for reduction.
a = daug(-0.891334,[-1.20857,0.799042;-0.799042,-1.20857],...
-4.74685,-21.3013)
b = [0.0262569;-0.189601;-0.113729;0.211465;-0.538239]
c = [0.120725,-0.336942,0.397198,-0.700524,-1.02235]
d=0
sys1 = system(a,b,c,d)
fHz = logspace(0.01,100,100)
sys1g = freq(sys1,fHz)
# Reduce to 3 states by balanced truncation.
[sysout1,hsv] = balmoore(sys1,{nsr=3})
sysout1g = freq(sysout1,fHz)
balerr = sys1g - sysout1g
# Reduce to a 3 state system by residualization
# for comparison purposes.
sysout2 = sresidualize(sys1,3)
sysout2g = freq(sysout2,fHz)
residerror = sys1g - sysout2g
gph1 = ctrlplot([sys1g,sysout1g,sysout2g,...
balerr,residerror],{logmagplot});
gph1 = plot(gph1,{!grid,legend=["original system";...
"reduced: balmoore";"reduced: sresidualize";...
"balmoore error";"sresidualize error"]})?