Mercurial > hg > ltpda
view m-toolbox/test/MPipeline/ssmtest.lwb @ 14:6d43f39633b8 database-connection-manager
Remove unused functions from utils.jmysql
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
<?xml version="1.0" encoding="utf-8"?> <LTPDAworkbench filepath="/Users/hewitson/working/ltp/ltpda/software/m-toolbox/test/MPipeline/ssmtest.lwb" name="ssmtest.lwb*"> <document name="SSM pipeline"> <block bounds="0 0 110 100" inputs="1" name="DFACS" outputs="1"> <LTPDAalgorithm mcategory="Constructor" mclass="ssm" mname="ssm" mpackage="" mversion="" portdims="1 10 1 10"> <HelpText> SSM statespace model class constructor. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: SSM statespace model class constructor. ** This class is written using the new OO structures of MATLAB R2008a and will not work with earlier MATLAB versions. Public properties (read-only): Public properties (read/write): name - name of analysis object Possible constructors: s = ssm() - creates an empty statespace model s = ssm('a1.xml') - creates a new statespace model by loading the object from disk. s = ssm('a1.mat') - creates a new statespace model by loading the object from disk. a = ssm(plist) - creates a statespace model from the description given in the parameter list a = ssm(struct) - creates a statespace model from the structure returned by struct(ssm). Parameter sets for plist constructor (in order of priority): From XML File ------------- Construct a statespace model by loading it from an XML file. 'filename' - construct a statespace model from a filename. Example: plist('filename', 'ss1.xml') [default: empty string] From MAT File ------------- Construct a statespace model by loading it from a MAT file. 'filename' - construct a statespace model from a filename. Example: plist('filename', 'ss1.mat') [default: empty string] From Built-in System ---------------- Construct a statespace model by specifying one of the built-in system names. Built-in models are stored in directories specified by SSM_MODELS in ltpda_startup. You can list multiple directories. A built-in model m-file must follow the naming convention ssm_model_*.m. 'Buit-in' - A system name. Example: plist('filename', 'model_LPF_Dynamics_noparams') Example: plist('Built-in', ' ') will show the names of all the existing systems 'dim' - Optional parameter to reduce the model to 1, 3, or 6 dimension. [Default: empty [] - return full model] From Repository --------------- Construct a statespace model by retrieving it from an LTPDA repository. 'Hostname' - the repository hostname. Only those objects which are statespace models are returned. [default: 'localhost']; Additional parameters: 'Database' - The database name [default: 'ltpda'] 'ID' - A vector of object IDs. [default: []] 'CID' - Retrieve all SSM objects from a particular collection. From a Miir --------------- Construct a statespace model out of a MIIR object. example : sys = ssm(themiir); From PZ model --------------- Construct a statespace model by retrieving it from an LTPDA repository. example : sys=ssm(thepzmodel); From Description ---------------- Construct a statespace model from a full description of the system. 'isADescription' >> special filed to tell the constructor which set to use compulsory fields: 'name','ssnames', 'outputnames', 'inputnames', 'timestep', 'amats', ... 'bmats', 'cmats', 'dmats', 'paramnames', 'paramvalues' optionnals fields : 'mmats' 'amats_handles' 'bmats_handles' 'cmats_handles' 'dmats_handles'... 'inputvarnames' 'ssvarnames' 'outputvarnames' 'paramsigmas' example : name = 'sys'; ssnames = {'ss1' 'ss2' 'ss3'}; ssvarnames = {{'ssvar1'} {'ssvar2'} {'ssvar31' 'ssvar32'}}; inputnames = {'input1' 'input2' 'input3'}; inputvarnames = {{'inputvar1'} {'inputvar2'} {'inputvar31' 'inputvar32'}}; outputnames = {'output1' 'output2' 'output3'}; outputvarnames = {{'outputvar1'} {'outputvar2'} {'outputvar31' 'outputvar32'}}; timestep = 0; paramnames = {}; paramvalues = []; amats = cell(3,3); bmats = cell(3,3); cmats = cell(3,3); dmats = cell(3,3); amats{1,1} = -1; amats{2,2} = -2; amats{3,3} = -3*eye(2); amats{3,1} = [-1;-3]; bmats{1,1} = 1; bmats{2,2} = 2; bmats{3,3} = 3*eye(2); cmats{1,1} = 1; cmats{2,2} = 1; cmats{3,3} = eye(2); dmats{1,3} = [6 6]; dmats{2,1} = 6; dmats{3,2} = [6;6]; sys = ssm(plist('isADescription', '' ,'name', name , ... 'timestep', timestep , 'paramnames', paramnames ,'paramvalues', paramvalues ,... 'inputnames', inputnames , 'outputnames',outputnames ,'ssnames', ssnames,... 'inputvarnames', inputvarnames , 'outputvarnames',outputvarnames ,'ssvarnames', ssvarnames,... 'amats', amats ,'bmats', bmats ,'cmats', cmats ,'dmats', dmats )); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% </HelpText> <sets> <set name="Default"/> <set name="From XML File"/> <set name="From MAT File"/> <set name="From Built-in Model"/> <set name="From Description"/> <set name="From Plist"/> <set name="From Repository"/> <set name="From Pzmodel"/> <set name="From Miir"/> </sets> <plists> <plist name="none"/> <plist name="none"> <param> <key>FILENAME</key> <val/> <type>char</type> </param> </plist> <plist name="none"> <param> <key>FILENAME</key> <val/> <type>char</type> </param> </plist> <plist name="none"> <param> <key>BUILT-IN</key> <val/> <type>char</type> </param> <param> <key>DIM</key> <val>3</val> <type>double</type> </param> <param> <key>WITHPARAMS</key> <val>true</val> <type>logical</type> </param> </plist> <plist name="none"/> <plist name="none"> <param> <key>PLIST</key> <val>(empty-plist)</val> <type>plist</type> </param> </plist> <plist name="none"> <param> <key>HOSTNAME</key> <val>localhost</val> <type>char</type> </param> <param> <key>DATABASE</key> <val>ltpda</val> <type>char</type> </param> <param> <key>ID</key> <val>[]</val> <type>double</type> </param> </plist> <plist name="none"> <param> <key>PZMODEL</key> <val>pzmodel(none)</val> <type>pzmodel</type> </param> </plist> <plist name="none"> <param> <key>MIIR</key> <val>none(fs=, ntaps=0.00, a=[], b=[])</val> <type>miir</type> </param> </plist> </plists> </LTPDAalgorithm> <plist name="none"> <param> <key>BUILT-IN</key> <val>DFACS_5_Science_Mode_1_All_Optical_Readouts</val> <type>char</type> </param> <param> <key>DIM</key> <val>1</val> <type>double</type> </param> <param> <key>WITHPARAMS</key> <val>true</val> <type>logical</type> </param> </plist> <port number="0" type="output"> <node> <pipe dstblock="set DFACS name" dstport="0" srcblock="DFACS"/> </node> </port> </block> <block bounds="150 0 110 100" inputs="1" name="set DFACS name" outputs="1"> <LTPDAalgorithm mcategory="Helper" mclass="ltpda_uoh" mname="setName" mpackage="" mversion="" portdims="1 10 1 10"> <HelpText> SETNAME Set the property 'name'. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: Set the property 'name'. CALL: obj = obj.setName('new name'); obj = obj.setName(plist('name', 'new name')); obj = setName(obj, 'new name'); obj = setName(); EXAMPLE: obj.setName -> Sets the name to the variable name. In this case to 'obj' INPUTS: obj - can be a vector, matrix, list, or a mix of them. pl - to set the name with a plist specify only one plist with only one key-word 'name'. M-FILE INFO: Get information about this methods by calling >> ao.getInfo('setName') Get information about a specified set-plist by calling: >> ao.getInfo('setName', 'set') VERSION: $Id: ssmtest.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ HISTORY: 27-05-2008 Diepholz Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% </HelpText> <sets> <set name="Default"/> </sets> <plists> <plist name="none"> <param> <key>NAME</key> <val/> <type>char</type> </param> </plist> </plists> </LTPDAalgorithm> <plist name="none"> <param> <key>NAME</key> <val/> <type>char</type> </param> </plist> <port number="0" type="output"> <node> <pipe dstblock="simulate DFACS" dstport="0" srcblock="set DFACS name"/> </node> </port> </block> <block bounds="250 100 110 100" inputs="2" name="simulate DFACS" outputs="1"> <LTPDAalgorithm mcategory="Statespace" mclass="ssm" mname="simulate" mpackage="" mversion="" portdims="1 10 1 10"> <HelpText> simulate simulates a discrete ssm with given inputs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: %simulate simulates a discrete ssm with given inputs CALL: [ao_out pl_out] = simulate(sys, plist_inputs) INPUTS: - sys, (array of) ssm object - plist_inputs contains 10 fields : - 2 noise fields - 'noise variable names' with a cell vector of strings of the desired input variable names - 'covariance' which gives the covariance of this noise between the different corresponding inputs given for the *TIME CONTINUOUS* noise model - 2 fields for input aos : - 'aos variable names' with a cell vector of strings of the desired input variable names - 'aos' which gives the aos for the different corresponding inputs - 2 fields to plug in constants : - 'constant variable names' with a cell vector of strings of the desired input variable names - 'constants' which gives the DC value for the different corresponding inputs - 2 arrays telling which blocks should be stored and returned - 'return states' : for blocks of the state space (ex [8]) - 'return outputs' : for blocks of the output (ex [1 5]) - 1 field 'Nsamples' telling max number of samples to use (it is smaller if aos are shorter than Nsamples) - 1 field 'ssini' is a cell array of vectors that give the initial position for simulation. 0 is the default. - 1 field 'tini' for the initial time, a time object or a number (in millisec). - 1 field 'displayTime' (0/1) to switch off/on the display. 0 (Off) is the default value OUTPUTS: _ pl_out contains 'lastX', the last state position *** the plist CANNOT be arrays anymore. *** Because of the very large number of output it is not desirable to have more than 1 simulation per function run. M-FILE INFO: Get information about this methods by calling >> ssm.getInfo('simulate') Get information about a specified set-plist by calling: >> ssm.getInfo('simulate', 'Default') ***** THERE ARE NO DEFAULT PARAMETERS ***** VERSION: $Id: ssmtest.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ HISTORY: 04-08-2008 A Grynagier : new multiple state spaces, independant variables in aos... 12-06-2008 M Weyrich : change for multiple outputs, bug fixes 17-04-2008 A Grynagier 19-02-2008 A Grynagier 17-02-2008 A Grynagier Creation 30-01-2008 M Weyrich TO DO: Check input aos for the timestep, tsdata, and ssm.timestep options to be defined (NL case) add check if one input mach no ssm input variable allow use of other LTPDA functions to generate white noise %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% </HelpText> <sets> <set name="Default"/> </sets> <plists> <plist name="none"> <param> <key>NOISE VARIABLE NAMES</key> <val>cell(0,0)</val> <type>cell</type> </param> <param> <key>COVARIANCE</key> <val>[]</val> <type>double</type> </param> <param> <key>AOS VARIABLE NAMES</key> <val>cell(0,0)</val> <type>cell</type> </param> <param> <key>AOS</key> <val>[]</val> <type>double</type> </param> <param> <key>CONSTANT VARIABLE NAMES</key> <val>cell(0,0)</val> <type>cell</type> </param> <param> <key>CONSTANT</key> <val>[]</val> <type>double</type> </param> <param> <key>RETURN STATES</key> <val>NONE</val> <type>char</type> </param> <param> <key>RETURN OUTPUTS</key> <val>ALL</val> <type>char</type> </param> <param> <key>NSAMPLES</key> <val>Inf</val> <type>double</type> </param> <param> <key>SSINI</key> <val>cell(0,0)</val> <type>cell</type> </param> <param> <key>TINI</key> <val>0</val> <type>double</type> </param> <param> <key>DISPLAYTIME</key> <val>0</val> <type>double</type> </param> </plist> </plists> </LTPDAalgorithm> <plist name="none"> <param> <key>AOS VARIABLE NAMES</key> <val>{'rx1_H1_Ifo_delayed'}</val> <type>cell</type> </param> <param> <key>AOS</key> <val>PORT_1</val> <type>char</type> </param> <param> <key>RETURN OUTPUTS</key> <val>{'fx_mps_c'}</val> <type>cell</type> </param> </plist> <port number="0" type="output"> <node> <pipe dstblock="tf" dstport="0" srcblock="simulate DFACS"/> </node> </port> </block> <block bounds="0 200 110 100" inputs="1" name="noise AO" outputs="1"> <LTPDAalgorithm mcategory="Constructor" mclass="ao" mname="ao" mpackage="" mversion="" portdims="1 10 1 10"> <HelpText> AO analysis object class constructor. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: AO analysis object class constructor. Create an analysis object. Possible constructors: a = ao() - creates an empty analysis object a = ao('a1.xml') - creates a new analysis object by loading the analysis object from disk. a = ao('a1.mat') - creates a new analysis object by loading the analysis object from disk. a = ao('a1.mat') - creates a new analysis object by loading the 2-column data set stored in the .MAT file. a = ao('file.txt') - creates a new analysis object by loading the a = ao('file.dat') data in 'file.txt'. The ascii file is assumed to be an equally sampled two-column file of time and amplitude. By default, the amplitude units are taken to be Volts ('V') and the time samples are assumed to be in seconds. a = ao('file',pl) - creates a new analysis object by loading the data in 'file'. The parameter list decide how the analysis object is created. The valid key values of the parameter list are: 'type' 'tsdata','fsdata','xydata' [default: 'tsdata'] 'use_fs' if this value is set, the x-axes is computed by the fs value. [default: empty array] 'columns' [1 2 1 4] Each pair represented the x- and y-axes. (Each column pair creates an analysis object) Is the value 'use_fs' is used then represent each column the y-axes. (Each column creates an analysis object) [default: [1 2] ] 'comment_char' The comment character in the file [default: ''] 'description' To set the description in the analysis object '...' every property where exist a public set-function in the AO class e.g. setName, setT0, setYunits, ... If the constructor creates multiple ao's it is possible to give each data class its own e.g. 'name'. In this case the parameter list with the key 'name' must have cell of the different values as the name of the different data objects. e.g. pl = plist('columns', [1 2 1 3], ... 'name', {'name1' 'name2'}, ... 'xunits', unit('s'), ... 'yunits', {unit('V') unit('Hz'})); This parameter list creates two ao's with tsdata. 'Robust' - set this to 'yes' to use (slow) robust data reading. Useful for complicated file formats. [default: 'yes'] NOTE: Data files with comments at the end of the lines can only be read if there are no lines with only comments. In this case, do not specify a comment character. If you really want to load a file like this, specify the 'Robust' option; this will be very slow for large files. a = ao(data) - creates an analysis object with a data object. Data object can be one of tsdata, fsdata, cdata, xydata, xyzdata. a = ao(data, hist) - creates an analysis object with a data object and a history object a = ao(specwin) - creates an analysis object from a specwin object a = ao(plist) - creates an analysis object from the description given in the parameter list Parameter sets for plist constructor (in order of priority): From XML File ------------- Construct an AO by loading it from an XML file. 'filename' - construct an AO from a filename. Example: plist('filename', 'a1.xml') [default: empty string] From MAT File ------------- Construct an AO by loading it from a MAT file. 'filename' - construct an AO from a filename. Example: plist('filename', 'a1.mat') [default: empty string] From ASCII File --------------- Construct an AO by loading it from an ASCII text file. 'filename' - construct an AO from a filename. Example: plist('filename', 'a1.txt') [default: empty string] For additional parameters, see constructor ao(file, pl) above. From Function ------------- Construct an AO from the description of any valid MATLAB function. 'fcn' - any valid MATLAB function. Example: plist('fcn', 'randn(100,1)') You can pass additional parameters to the fcn as extra parameters in the parameter list: plist('fcn', 'a*b', 'a', 2, 'b', 1:20); ** Note: case is ignored in the function specification such the following: plist('fcn', 'a*A/b', 'a', 2, 'B', 1:20); results in: 2*2*[1:20] [default: 'randn(100,1)'] From Values ----------- Construct an AO from a set of values. 'vals' - a set of values. Example: plist('vals', [1 2 3]) optional parameter: repeat 'N' times Example: plist('vals', [1 2 3], 'N', 10) [default: vals: [1], N: [1] ] OR To produce a tsdata AO 'xvals' - a set of x values. 'yvals' - a set of y values. From Time-series Function ------------------------- Construct an AO from a function of time, t. 'tsfcn' - a function of time. You can also specify optional parameters 'fs' - sampling frequency [default: 10 Hz] 'nsecs' - length in seconds [default: 10 s] You can also specify the initial time (t0) associated with the time-series by passing a parameter 't0' with a value that is a time object [default: time(0)] Example: plist('fs', 10, 'nsecs', 10, ... 'tsfcn', 'sin(2*pi*1.4*t) + 0.1*randn(size(t))', ... 't0', time('1980-12-01 12:43:12')); From Frequency-series Function ------------------------------ Construct an AO from a function of frequency, f. 'fsfcn' - a function of frequency, f. [default: 'f'] You can also specify optional parameters: 'f1' - the initial frequency [default: 1e-9] 'f2' - the final frequency [default: 5] 'nf' - the number of frequency samples [default: 1000] 'scale' - 'log' or 'lin' frequency spacing [default: 'log'] or provide a frequency vector: 'f' - a vector of frequencies on which to evaluate the function [default: [] ] From Window ----------- Construct an AO from a spectral window object. 'win' - A specwin object. This creates a cdata type AO containing the window values. Example: plist('win', specwin('Hannning', 100)) [default: specwin('Hanning', 100)] From Waveform ------------- Construct an AO from a waveform description. 'waveform' - a waveform description (see options below). You can also specify additional parameters: 'fs' - sampling frequency [default: 10 Hz] 'nsecs' - length in seconds [default: 10 s] 't0' - time-stamp of the first data sample [default time(0)] and, for the following waveform types: 'sine wave' - 'A', 'f', 'phi', 'nsecs', 'toff' (can be vectors for sum of sine waves) 'A' - Amplitude of the wave 'f' - Frequency of the wave 'phi' - Phase of the eave 'nsecs' - Number of seconds (in seconds) 'toff' - Offset of the wave (in seconds) 'noise' - 'type' (can be 'Normal' or 'Uniform') 'sigma' specify the standard deviation 'chirp' - 'f0', 'f1', 't1' (help chirp) 'Gaussian pulse' - 'f0', 'bw' (help gauspuls) 'Square wave' - 'f', 'duty' (help square) 'Sawtooth' - 'f', 'width' (help sawtooth) You can also specify the initial time (t0) associated with the time-series by passing a parameter 't0' with a value that is a time object. [defaults: waveform: 'sine wave', A: 1, f: 1.23, phi: 0, fs: 10, nsecs: 10, t0: time(0) ] From Repository --------------- Construct an AO by retrieving it from an LTPDA repository. 'Hostname' - the repository hostname. Only those objects which are AOs are returned. [default: 'localhost']; Additional parameters: 'Database' - The database name [default: 'ltpda'] 'ID' - A vector of object IDs. [default: []] 'CID' - Retrieve all AO objects from a particular collection. 'Binary' - Set to 'yes' to retrieve from stored binary representation (not always available). From Polynomial --------------- Construct an AO from a set of polynomial coefficients. 'polyval' - a set of polynomial coefficients. [default: [-0.0001 0.02 -1 -1] ] Additional parameters: 'Nsecs' and 'fs' - number of seconds, and sample rate [defaults: nsecs: 10, fs: 10] or 't' - vector of time vertices [default: [] ] Example: a = ao(plist('polyval', [1 2 3], 'Nsecs', 10, 'fs', 10)); From Pzmodel ------------ Generates an ao with a timeseries with a prescribed spectrum. p = [pz(f1,q1) pz(f2,q2)] z = [pz(f3,q3)] pzm = pzmodel(gain, p, z) The constructor also needs: fs - sampling frequency nsecs - number of seconds to be generated a = ao(plist('pzmodel', pzm, 'Nsecs', nsecs, 'Fs', fs)) From Model ---------- A collection of built-in models which construct data series and return them in AOs. 'Model' - give the model name. To get a list of models: ao(plist('Model', '')) Each model has additional parameters that need to be passed. To see the parameters: >> help ao.<model_name> for example, >> help ao.mdc1_fd_dynamics From Plist ---------- 'Plist' - construct from a plist. The value passed should be a plist object. [default: empty plist] Examples: 1) Normally distributed random noise time-series p = plist('waveform', 'noise', 'fs', 10, 'nsecs', 1000); rd10 = ao(p); Indexing: b = a(1) % where a is an array of analysis objects d = a.data; % get the data object h = a.hist; % get the history object d = a.data.x(1:20); % get a matrix of data values x; 2) Timeseries with a prescribed spectrum p = plist('pzmodel',pzm, 'fs',10, 'nsecs', 120, 'ndigits',50) a = ao(p) fs - sampling frequency nsecs - number of seconds in time series ndigits - number of digits for symbolic math toolbox (default: 32) From pzmodel ------------ Generates an ao with a timeseries with a prescribed spectrum. p = [pz(f1,q1) pz(f2,q2)] z = [pz(f3,q3)] pzm = pzmodel(gain, p, z) The constructor also needs: fs - sampling frequency nsecs - number of seconds to be generated a = ao(pzm, nsecs, fs) The following call returns an minfo object that contains information about the AO constructor: >> info = ao.getInfo You can get information about class methods by calling: >> info = ao.getInfo(method) e.g. info = ao.getInfo('pwelch') You can also restrict the sets of parameters contained in the minfo object by calling: >> info = ao.getInfo(method, set) e.g., info = ao.getInfo('ao', 'From Vals') See also tsdata, fsdata, xydata, cdata, xyzdata M Hewitson 30-01-07 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% </HelpText> <sets> <set name="Default"/> <set name="From XML File"/> <set name="From MAT File"/> <set name="From ASCII File"/> <set name="From Function"/> <set name="From Values"/> <set name="From Time-series Function"/> <set name="From Frequency-series Function"/> <set name="From Window"/> <set name="From Waveform"/> <set name="From Polynomial"/> <set name="From Repository"/> <set name="From Plist"/> <set name="From Pzmodel"/> <set name="From Model"/> </sets> <plists> <plist name="none"/> <plist name="none"> <param> <key>FILENAME</key> <val/> <type>char</type> </param> </plist> <plist name="none"> <param> <key>FILENAME</key> <val/> <type>char</type> </param> </plist> <plist name="none"> <param> <key>FILENAME</key> <val/> <type>char</type> </param> <param> <key>TYPE</key> <val>tsdata</val> <type>char</type> </param> <param> <key>COLUMNS</key> <val>[1 2]</val> <type>double</type> </param> <param> <key>XUNITS</key> <val>[ unit(' s ') ]</val> <type>unit</type> </param> <param> <key>YUNITS</key> <val>[ unit(' V ') ]</val> <type>unit</type> </param> <param> <key>T0</key> <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> <type>time</type> </param> <param> <key>COMMENT_CHAR</key> <val/> <type>char</type> </param> <param> <key>USE_FS</key> <val/> <type>char</type> </param> <param> <key>ROBUST</key> <val>yes</val> <type>char</type> </param> </plist> <plist name="none"> <param> <key>FCN</key> <val>randn(100,1)</val> <type>char</type> </param> <param> <key>YUNITS</key> <val>[ unit(' V ') ]</val> <type>unit</type> </param> </plist> <plist name="none"> <param> <key>VALS</key> <val>[]</val> <type>double</type> </param> <param> <key>N</key> <val>1</val> <type>double</type> </param> <param> <key>DTYPE</key> <val/> <type>char</type> </param> <param> <key>FS</key> <val>[]</val> <type>double</type> </param> <param> <key>XVALS</key> <val>[]</val> <type>double</type> </param> <param> <key>YVALS</key> <val>[]</val> <type>double</type> </param> <param> <key>YUNITS</key> <val/> <type>char</type> </param> </plist> <plist name="none"> <param> <key>TSFCN</key> <val>t</val> <type>char</type> </param> <param> <key>FS</key> <val>10</val> <type>double</type> </param> <param> <key>NSECS</key> <val>1</val> <type>double</type> </param> <param> <key>T0</key> <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> <type>time</type> </param> <param> <key>XUNITS</key> <val>[ unit(' s ') ]</val> <type>unit</type> </param> <param> <key>YUNITS</key> <val>[ unit(' V ') ]</val> <type>unit</type> </param> </plist> <plist name="none"> <param> <key>FSFCN</key> <val>f</val> <type>char</type> </param> <param> <key>F1</key> <val>1e-09</val> <type>double</type> </param> <param> <key>F2</key> <val>5</val> <type>double</type> </param> <param> <key>NF</key> <val>1000</val> <type>double</type> </param> <param> <key>SCALE</key> <val>log</val> <type>char</type> </param> <param> <key>F</key> <val>[]</val> <type>double</type> </param> <param> <key>XUNITS</key> <val>[ unit(' Hz ') ]</val> <type>unit</type> </param> <param> <key>YUNITS</key> <val>[ unit(' V ') ]</val> <type>unit</type> </param> </plist> <plist name="none"> <param> <key>WIN</key> <val> specwin('Hanning', 100)</val> <type>specwin</type> </param> <param> <key>YUNITS</key> <val>[ unit(' I ') ]</val> <type>unit</type> </param> </plist> <plist name="none"> <param> <key>WAVEFORM</key> <val>sine wave</val> <type>char</type> </param> <param> <key>A</key> <val>1</val> <type>double</type> </param> <param> <key>F</key> <val>1.23</val> <type>double</type> </param> <param> <key>PHI</key> <val>0</val> <type>double</type> </param> <param> <key>FS</key> <val>10</val> <type>double</type> </param> <param> <key>NSECS</key> <val>10</val> <type>double</type> </param> <param> <key>T0</key> <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> <type>time</type> </param> <param> <key>TOFF</key> <val>0</val> <type>double</type> </param> <param> <key>XUNITS</key> <val>[ unit(' s ') ]</val> <type>unit</type> </param> <param> <key>YUNITS</key> <val>[ unit(' V ') ]</val> <type>unit</type> </param> </plist> <plist name="none"> <param> <key>POLYVAL</key> <val>[-0.0001 0.02 -1 -1]</val> <type>double</type> </param> <param> <key>NSECS</key> <val>10</val> <type>double</type> </param> <param> <key>FS</key> <val>10</val> <type>double</type> </param> <param> <key>T</key> <val>[]</val> <type>double</type> </param> <param> <key>XUNITS</key> <val>[ unit(' s ') ]</val> <type>unit</type> </param> <param> <key>YUNITS</key> <val>[ unit(' V ') ]</val> <type>unit</type> </param> </plist> <plist name="none"> <param> <key>HOSTNAME</key> <val>localhost</val> <type>char</type> </param> <param> <key>DATABASE</key> <val>ltpda</val> <type>char</type> </param> <param> <key>ID</key> <val>[]</val> <type>double</type> </param> <param> <key>BINARY</key> <val>no</val> <type>char</type> </param> </plist> <plist name="none"> <param> <key>PLIST</key> <val>(empty-plist)</val> <type>plist</type> </param> </plist> <plist name="none"> <param> <key>PZMODEL</key> <val>pzmodel(none)</val> <type>pzmodel</type> </param> <param> <key>NSECS</key> <val>0</val> <type>double</type> </param> <param> <key>FS</key> <val>0</val> <type>double</type> </param> <param> <key>XUNITS</key> <val>[ unit(' s ') ]</val> <type>unit</type> </param> <param> <key>YUNITS</key> <val>[ unit(' V ') ]</val> <type>unit</type> </param> </plist> <plist name="none"> <param> <key>MODEL</key> <val/> <type>char</type> </param> </plist> </plists> </LTPDAalgorithm> <plist name="none"> <param> <key>TSFCN</key> <val>1e-3*randn(size(t))</val> <type>char</type> </param> <param> <key>FS</key> <val>10</val> <type>double</type> </param> <param> <key>NSECS</key> <val>1000</val> <type>double</type> </param> </plist> <port number="0" type="output"> <node> <pipe dstblock="simulate DFACS" dstport="1" srcblock="noise AO"/> <pipe dstblock="tf" dstport="1" srcblock="noise AO"/> </node> </port> </block> <block bounds="400 100 110 100" inputs="2" name="tf" outputs="1"> <LTPDAalgorithm mcategory="Signal Processing" mclass="ao" mname="ltfe" mpackage="" mversion="" portdims="1 10 1 10"> <HelpText> LTFE implement transfer-function estimation computed on a log frequency axis. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: LTFE implement transfer-function estimation computed on a log frequency axis. CALL: tfs = ltfe(as) tfs = ltfe(as, pl) INPUTS: as - array of analysis objects pl - parameter list (see below) OUTPUTS: bs - array of analysis objects, one for each input PARAMETER LIST: Kdes - desired number of averages [default: 100] Lmin - minimum segment length [default: 0] Jdes - number of spectral frequencies to compute [default: fs/4] Win - a specwin window object Only the design parameters of the window object are used; the window is recomputed for each DFT length inside the ltpda_dft algorithm. [default: Kaiser with -200dB PSLL] Olap - desired overlap [default: taken from window] Order - order of detrending. -1 - no detrending 0 - subtract mean 1 - subtract linear fit N - subtract fit of polynomial, order N M-FILE INFO: Get information about this methods by calling >> ao.getInfo('ltfe') Get information about a specified set-plist by calling: >> ao.getInfo('ltfe', 'None') VERSION: $Id: ssmtest.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ HISTORY: 02-02-2007 M Hewitson Created %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% </HelpText> <sets> <set name="Default"/> </sets> <plists> <plist name="none"> <param> <key>KDES</key> <val>100</val> <type>double</type> </param> <param> <key>JDES</key> <val>1000</val> <type>double</type> </param> <param> <key>LMIN</key> <val>0</val> <type>double</type> </param> <param> <key>WIN</key> <val> specwin('BH92', 10)</val> <type>specwin</type> </param> <param> <key>OLAP</key> <val>-1</val> <type>double</type> </param> <param> <key>ORDER</key> <val>0</val> <type>double</type> </param> </plist> </plists> </LTPDAalgorithm> <plist name="none"> <param> <key>KDES</key> <val>100</val> <type>double</type> </param> <param> <key>JDES</key> <val>1000</val> <type>double</type> </param> <param> <key>LMIN</key> <val>0</val> <type>double</type> </param> <param> <key>WIN</key> <val> specwin('BH92', 10)</val> <type>specwin</type> </param> <param> <key>OLAP</key> <val>-1</val> <type>double</type> </param> <param> <key>ORDER</key> <val>0</val> <type>double</type> </param> </plist> <port number="0" type="output"> <node> <pipe dstblock="view" dstport="0" srcblock="tf"/> </node> </port> </block> <block bounds="500 100 110 100" inputs="1" name="view" outputs="1"> <LTPDAalgorithm mcategory="Output" mclass="ao" mname="iplot" mpackage="" mversion="" portdims="1 10 1 10"> <HelpText> IPLOT provides an intelligent plotting tool for LTPDA. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: IPLOT provides an intelligent plotting tool for LTPDA. CALL: hfig = iplot (a,pl) [hfig, hax] = iplot (a,pl) [hfig, hax, hli] = iplot (a,pl) INPUTS: pl - a parameter list a - input analysis object OUTPUTS: hfig - handles to figures hax - handles to axes hli - handles to lines Plot parameters: 'Arrangement' - select the plot layout: 'single' - plots all AOs on individual figures 'stacked' - plots all AOs on the same axes [default] 'subplots' - plots all AOs on subplots 'Function' - specify the plot function: 'plot', 'stairs', 'stem' [default: 'plot'] *** doesn't work for xyzdata AOs Line parameters: The following properties take cell array values. If the length of the cell array is shorter than the number of lines to plot, the remaining lines will be plotted with the default options. If the cell array is of length 2 and the first cell contains the string 'all', then the second cell is used to set the propery of all lines. 'LineColors' - a cell array of color definitions for each line. 'LineStyles' - a cell array of line styles. 'Markers' - a cell array of markers. 'LineWidths' - a cell array of line widths. If the length of the cell array is shorter than the number of lines to plot, the remaining lines will be plotted with the default line width. Axes parameters: 'Legends' - specify a cell array of strings to be used for the plot legends. If a cell contains an empty string, the default legend string is built. If a single string 'off' is given instead of a cell array, then the legends are all switched off. 'XLabels' - Specify the labels to be used on the x-axes. The units are added from the data object 'xunits' property. 'YLabels' - Specify the labels to be used on the y-axes. The units are added from the data object 'yunits' property. If the object contains complex data, you should specify two y-labels for that object. The following axis properties also work with the 'all' keyword as described above in the line properties section. 'XScales' - Specify the scales to be used on the x-axes. 'YScales' - Specify the scales to the used on the y-axes. If an object contains complex data, you should specify two y-labels for that object. 'XRanges' - Specify the ranges to be displayed on the x-axes. 'YRanges' - Specify the ranges to the displayed on the y-axes. Error parameters: If you give more than one input AO then you must specify the following parameter values in a cell-array, one cell for each input AO. Leave the cell empty to plot no errors. Each error can be a value or a vector the same length as the data vector. If you give and upper limit but not lower limit, then the errors are assumed to be symmetric (and vice versa) 'XerrL' - lower bound error values for the X data points. 'XerrU' - upper bound error values for the X data points. 'YerrL' - lower bound error values for the Y data points. 'YerrU' - upper bound error values for the Y data points. Math operations: You can specify rudimentary math operations to be performed on the X and Y data prior to plotting. The 'all' keyword is also supported by these parameters. 'Xmaths' - specify math operations to perform on the data vector 'x'. For example, plist('Xmaths', 'abs(x)'). 'Ymaths' - specify math operations to perform on the data vector 'y'. For example, plist('Ymaths', 'sqrt(y)'). Time-series parameters: in addition to the general options, time-series objects have the following additional parameters. 'Xunits' - specify the units on the x-axis as 'us' - microseconds 'ms' - milliseconds 's' - seconds [default] 'm' - minutes 'h' - hours 'D' - days 'M' - months 'HH:MM:SS' - using a date/time format recognized by datetic (help datetic) Frequency-series parameters: 'complexPlotType' - specify how to plot complex data. Choose from: - 'realimag' - 'absdeg' - 'absrad' EXAMPLES: 1) Plot two time-series AOs with different colors, line styles, and widths pl = plist('Linecolors', {'g', 'k'}, 'LineStyles', {'', '--'}, 'LineWidths', {1, 4}); iplot(tsao1, tsao2, pl); 2) Plot two time-series AOs in subplots. Also override the second legend text and the first line style. pl = plist('Arrangement', 'subplots', 'LineStyles', {'--'}, 'Legends', {'', 'My Sine Wave'}); iplot(tsao1, tsao2, pl); 3) Plot two time-series AOs taking the square of the y-values of the first AO and the log of the x-values of the second AO. pl = plist('Arrangement', 'subplots', 'YMaths', 'y.^2', 'XMaths', {'', 'log(x)'}); iplot(tsao1, tsao2, pl); 4) Plot two frequency-series AOs on subplots with the same Y-scales and Y-ranges pl1 = plist('Yscales', {'All', 'lin'}); pl2 = plist('arrangement', 'subplots', 'YRanges', {'All', [1e-6 100]}); iplot(fsd1, fsd2, pl1, pl2) M-FILE INFO: Get information about this methods by calling >> ao.getInfo('iplot') Get information about a specified set-plist by calling: >> ao.getInfo('iplot', 'None') VERSION: $Id: ssmtest.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ HISTORY: 22-12-07 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% </HelpText> <sets> <set name="Time-series plot"/> <set name="Frequency-series plot"/> <set name="Y data plot"/> <set name="X-Y data plot"/> <set name="3D plot"/> </sets> <plists> <plist name="none"> <param> <key>COLORS</key> <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> <type>cell</type> </param> <param> <key>ARRANGEMENT</key> <val>stacked</val> <type>char</type> </param> <param> <key>FUNCTION</key> <val>plot</val> <type>char</type> </param> <param> <key>LEGENDLOCATION</key> <val>NorthEast</val> <type>char</type> </param> <param> <key>XERRL</key> <val>[]</val> <type>double</type> </param> <param> <key>XERRU</key> <val>[]</val> <type>double</type> </param> <param> <key>YERRU</key> <val>[]</val> <type>double</type> </param> <param> <key>YERRL</key> <val>[]</val> <type>double</type> </param> <param> <key>XLABEL</key> <val>Time</val> <type>char</type> </param> <param> <key>YLABEL</key> <val>Amplitude</val> <type>char</type> </param> </plist> <plist name="none"> <param> <key>COLORS</key> <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> <type>cell</type> </param> <param> <key>ARRANGEMENT</key> <val>stacked</val> <type>char</type> </param> <param> <key>FUNCTION</key> <val>plot</val> <type>char</type> </param> <param> <key>LEGENDLOCATION</key> <val>NorthEast</val> <type>char</type> </param> <param> <key>XERRL</key> <val>[]</val> <type>double</type> </param> <param> <key>XERRU</key> <val>[]</val> <type>double</type> </param> <param> <key>YERRU</key> <val>[]</val> <type>double</type> </param> <param> <key>YERRL</key> <val>[]</val> <type>double</type> </param> <param> <key>COMPLEXPLOTTYPE</key> <val>absdeg</val> <type>char</type> </param> <param> <key>XLABEL</key> <val>Frequency</val> <type>char</type> </param> </plist> <plist name="none"> <param> <key>COLORS</key> <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> <type>cell</type> </param> <param> <key>ARRANGEMENT</key> <val>stacked</val> <type>char</type> </param> <param> <key>FUNCTION</key> <val>plot</val> <type>char</type> </param> <param> <key>LEGENDLOCATION</key> <val>NorthEast</val> <type>char</type> </param> <param> <key>XERRL</key> <val>[]</val> <type>double</type> </param> <param> <key>XERRU</key> <val>[]</val> <type>double</type> </param> <param> <key>YERRU</key> <val>[]</val> <type>double</type> </param> <param> <key>YERRL</key> <val>[]</val> <type>double</type> </param> <param> <key>XLABEL</key> <val>Sample</val> <type>char</type> </param> <param> <key>YLABEL</key> <val>Value</val> <type>char</type> </param> </plist> <plist name="none"> <param> <key>COLORS</key> <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> <type>cell</type> </param> <param> <key>ARRANGEMENT</key> <val>stacked</val> <type>char</type> </param> <param> <key>FUNCTION</key> <val>plot</val> <type>char</type> </param> <param> <key>LEGENDLOCATION</key> <val>NorthEast</val> <type>char</type> </param> <param> <key>XERRL</key> <val>[]</val> <type>double</type> </param> <param> <key>XERRU</key> <val>[]</val> <type>double</type> </param> <param> <key>YERRU</key> <val>[]</val> <type>double</type> </param> <param> <key>YERRL</key> <val>[]</val> <type>double</type> </param> <param> <key>XLABEL</key> <val>X-data</val> <type>char</type> </param> <param> <key>YLABEL</key> <val>Y-data</val> <type>char</type> </param> <param> <key>YMATHS</key> <val/> <type>char</type> </param> <param> <key>XMATHS</key> <val/> <type>char</type> </param> </plist> <plist name="none"> <param> <key>COLORS</key> <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> <type>cell</type> </param> <param> <key>ARRANGEMENT</key> <val>single</val> <type>char</type> </param> <param> <key>XLABEL</key> <val>Time</val> <type>char</type> </param> <param> <key>YLABEL</key> <val>Frequency</val> <type>char</type> </param> <param> <key>ZLABEL</key> <val>Amplitude</val> <type>char</type> </param> <param> <key>YMATHS</key> <val/> <type>char</type> </param> <param> <key>ZMATHS</key> <val/> <type>char</type> </param> <param> <key>XMATHS</key> <val/> <type>char</type> </param> </plist> </plists> </LTPDAalgorithm> <plist name="none"> <param> <key>COLORS</key> <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> <type>cell</type> </param> <param> <key>ARRANGEMENT</key> <val>stacked</val> <type>char</type> </param> <param> <key>FUNCTION</key> <val>plot</val> <type>char</type> </param> <param> <key>LEGENDLOCATION</key> <val>NorthEast</val> <type>char</type> </param> <param> <key>XERRL</key> <val>[]</val> <type>double</type> </param> <param> <key>XERRU</key> <val>[]</val> <type>double</type> </param> <param> <key>YERRU</key> <val>[]</val> <type>double</type> </param> <param> <key>YERRL</key> <val>[]</val> <type>double</type> </param> <param> <key>XLABEL</key> <val>Time</val> <type>char</type> </param> <param> <key>YLABEL</key> <val>Amplitude</val> <type>char</type> </param> </plist> <port number="0" type="output"/> </block> </document> </LTPDAworkbench>