INDEX

Function: LSIM_MOD


Purpose. Simulation of the modal decomposition.

Synopsis.

[p_dom,l2_norm] =
lsim_mod(sys,u,t,x0,ixy[,npol[,sbplot1[,sbplot2[,sbplot3]]]])

Description. This function simulates the modal decomposition of a state or of a measurement signal. If it is invoked with output argument(s), the simulation is not plotted but the poles are sorted out, ordered with respect to their L2 contribution. Dominant modes can be identified in that way.

Input arguments.

 sys,u,t,x0 Same as for the function lsim or alternatively u = 'u1' (or 'u2',...) for an unit step demand at the first (or second,...) input. In this case t indicates the length of the simulation.
 ixy String like 'x1' (or 'x2',...), 'y1' (or 'y2',...) which indicates the signal (only one at a time) which is plotted. 'xi' stands for ith state, 'yi' for ith output.
 npol Is the number of modes which are plotted. The selection is made by considering the largest L2 norms during the simulation interval. If npol has 2 entries the modes from rank npol(1) to rank npol(2) are plotted.
 sbplot1 Is a 1 by 3 integer matrix giving the sub-plot box for displaying the modal simulation result.
 sbplot2 Similar for the legend.
 sbplot3 Similar for the global simulation. The exact global simulation corresponds to the solid line. The sum of the npol dominant modes corresponds to the dashed line.
For example sbplot1=[1,2,1], sbplot2=[2,2,2], sbplot3=[2,2,4].

Output arguments.

 p_dom If there is an output argument the simulation is not plotted. p_dom is the vector of the npol dominant poles (ordering in decreasing dominance).
 l2_norm Is the vector of the L2 contribution measures of the modes.

See also:lsim, plot_res


Examples. The following commands lines illustrate a standard modal analysis, note that we close the feedback loop before using lsim_mod.
  sys = rcamdata('lat',0,2,0);
  Klat = fb_prop(sys,0,[-1+%i;-.6;-1.7;-1.4;-1.2],'n',...
                                           [4 4 1 1 1]);
  sysfb = sys /. (-Klat);

  lsim_mod(sysfb,'u1',10,0,'y1')
The resulting modal decomposition is given in the following figure (the signal 'y1', sum of all modes, is given on the right hand side).