eval(demosdt('echoon'));format short e clear variables global; comgui('close all'); % Illustration of the main identification procedure IDRC and IDRM on a simple % example. % % You should learn about the main procedure used in the SDT, by reading % doc('sdt/idrc'). This demo covers material in the doc('sdt/idrc') and % doc('sdt/idrm') sections. % % See also demos d_iiplot, gartid % doc diiplot, idrc, idrm % This is the initialization (as in the d_iiplot demonstration) load sdt_id iiplot iicom('submagpha'); demosdt('pause');%------------------------------------------------ % The standard identification procedure can be accessed through the UI command % function IDCOM. This procedure starts with the construction of a set of % initial pole estimates. For this purpose you should generally use two IDCOM % commands % e to obtain local estimates of poles whose frequency you indicate as % a number or with the mouse. % ea to add those poles to the current set IIpo if you are happy of the local % estimate. % An estimate for the first pole can be found here using idcom('e 15 112'); % - Now use the idcom e and ea commands to estimate the other 3 poles of % the current data. % Note in the present case, the frequency step is small compared to the % level of damping and the e30 command (narrow band estimate with 30 points) % is more appropriate % - When done, quit the idcom command mode (the prompt idcom,iicom>) by typing % 'q' or 'quit'. idcom; idcom('table IIpo'); % If you have done it right up to here, your current set of poles IIpo should % contain something like XF(5).po = [ 1.1298e+02 1.0009e-02 1.6974e+02 1.2615e-02 1.9320e+02 1.0457e-02 2.3190e+02 8.9411e-03 ]; % with this set of poles you can identify a model for the whole bandwidth % using the IDCOM command EST idcom('est'); % as you can see the initial identified model can already be quite good. % % You can use the menus and buttons of the GUI to see that other % transfer functions are also well identified. demosdt('pause');%------------------------------------------------ iicom(';submagpha'); %inv % In general significant improvements can be obtained by doing an non-linear % optimization of the current set of poles (IDCOM command EUP). % % Although this is hardly necessary for this simple example, you can select the band near mode 2 (using idcom('wmo')) or and use update the pole in this band idcom('wmin 160 180') % in general you would use the idcom('wmo') command idcom('eopt local') % 'local' forces to update poles in the selected band only idcom(';w0;est'); % re-identify on full bandwidth % The 'eopt' command tends to wander around in cases with many poles. % For broadband optimization, you will thus prefer the ID_RC algorithm % ('eup' command). Here for example let it run for 10 iterations and exit % by asking for 0 more iterations idcom('eup .05 .002 -10'); % If you have actually done 10 iterations, you will see that % - the costs after an initial increase are converging (not much below the % initial which was already extremely good in this case % - the damping and frequency steps have decreased rapidly from the initial % values of 10% and 0.2%. Since all four modes have already converged in % both frequency and damping, it was time to stop iterating. demosdt('pause');%------------------------------------------------ iicom(';ch1;submagpha'); %inv % As the considered test data is MIMO, the model that you just identified is % not minimal. The ID_RM function creates minimal models based on the results % of ID_RC. % We can create such a minimal model and check that it still fits the test data % quite well as follows out=id_rm(XF(5),[1 1 1 1]); XF(3) = res2xf(out,IIw); iicom('IIxhOn'); % overlay the corresponding response IIxh h=legend('data','first ID','minimal model');iimouse; % and compute the increase in the quadratic and logLS costs disp(sprintf('\nCost: quadratic logLS\nFirst ID %18.4e%14.4e\nMinimal Model%14.4e%14.4e\n', [ii_cost(IIxf,IIxe);ii_cost(IIxf,IIxh)]')) %fex % NOTE: an equivalent (but more expensive computationally) way of computing % these frequency responses would be to create a state-space model and % use QBODE to evaluate the FRF % % [a,b,c,d]=res2ss(IIres,IIpo,IDopt); % IIxh=qbode(a,b,c,d,IIw*2*pi); iiplot % % The state space model can be used for control design purposes or be % coupled with other component models. demosdt('pause');%------------------------------------------------ % - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - % Up to now the identification was done using a complex mode model (IDopt(6)=1) % To allow a coupled use of Identification and Finite Element results one % one must identify a NORMAL MODE MODEL % % For good identifications and for the greatest accuracy, this should be done % with ID_NOR (which creates a non-proportionally damped normal mode model) nor = id_nor(XF(5)); IIxe=nor2xf(nor,IIw,'hz'); % Equivalent low level call % [om,ga,pb,cp] = id_nor(IIres,IIpo,IDopt); % IIxe = nor2xf(om,ga,pb,cp,IIw*2*pi); % Adding the contributions of identified residual terms (rows 5-6 of IIres) IIxh = IIxe + res2xf(IIres,IIpo,IIw,IDopt,[5 6]); iiplot; h=legend('data','normal mode model','nor+static correction');iimouse; % as you can see the addition of the residual terms can be particularly % important. % The model identified with ID_NOR is not proportionally damped (GA contains % non diagonal terms disp(nor.ga) % NOTE: the identified damping matrix GA differs slightly from the true matrix % of this example % ga = [ 1.4199e+01 0 0 0 % 0 2.1221e+01 -2.1000e+01 0 % 0 -2.1000e+01 2.4294e+01 0 % 0 0 0 2.9117e+01 ] % because of the noise and because the model used to generate the example % data contains a 5th mode at 391 Hz which is not included in the test % data. % NOTE: the signs of the important off-diagonal may change if the sign of % the corresponding normal mode is changed. (see the manual for details) demosdt('pause');%------------------------------------------------ % A proportionally damped normal mode model could also be created using [som2,ga2,pbs2,cps2] = res2nor(IIres,IIpo,IDopt); % which is less accurate because it does not allow non-proportional damping % interactions. In the present case the difference is very small. IIxe = nor2xf(som2,ga2,pbs2,cps2,IIw*2*pi)+res2xf(IIres,IIpo,IIw,IDopt,[5 6]); iiplot; h=legend('data','res2nor','id\_nor'); iimouse disp(sprintf('\nCost: quadratic logLS\nid_nor %18.4e%14.4e\nres2nor %14.4e%14.4e\n', [ii_cost(IIxf,IIxh);ii_cost(IIxf,IIxe)]')) %fex %----------------------------------------------------------------- eval(demosdt('echooff')) % Etienne Balmes 07/14/93, 02/18/00 % Copyright (c) 1990-2003 by SDTools, All Rights Reserved. % $Revision: 1.3 $ $Date: 2004/08/17 09:42:50 $