National Instruments 370760B-01 Calculator User Manual


 
3.8. MODEL REDUCTION 123
g1 = ctrlplot(sysout2g,g1,{logmagplot,line
style=4});
g1 = ctrlplot(residerror,g1,{logmagplot,line
style=5});
g1 = ctrlplot(truncerror,g1,{logmagplot,line
style=6});
g1 = plot(g1,{!grid,legend=["original system";...
"residualized system";"truncated system";...
"residualization error";"truncation error"]})?
Frequency
0.1 1 100.01 100
Magnitude
0.0001
0.001
0.01
1e-05
0.1
original system
residualized system
truncated system
residualization error
truncation error
3.8.2 Balanced Realizations
The function balmoore (cross-licensed from the Model Reduction Module) produces a
balanced realization and optionally truncates it. The can be used to obtain a balanced
realization and the Hankel singular values without necessarily truncating the system.
The following illustrates the use of the function using the same system as in the
truncate and sresidualize example.
# Balanced truncation.
[sysout3,hsv] = balmoore(sys1,{nsr=3})
sysout3g = freq(sysout3,fHz)
balerr = sys1g - sysout3g