imat_fn/srs2trans (+Modal)


Purpose

Generate transient from Shock Response Spectrum.

Syntax

outtrans=srs2trans(specfun,damping,deltat,duration,interpfreq)
[outtrans,outsrs,outerr]=srs2trans(specfun,damping,deltat,duration,interpfreq,options,'interactive','noprogbar','ntc')

Description

SRS2TRANS generates a transient using a summation of decaying sine waves. The frequency of the decaying sine waves come from the frequencies at which the SRS is specified. The amplitudes of the individual decaying sine waves are initially guessed and then the guesses are improved by trying to minimize the RMS dB error between the spec SRS and the SRS of the equivalent transient.

******* WARNING ******
It is crucially important that the user know what damping is being used. The SRS definition is not complete without the damping value at which it was created.
******* WARNING ******

SRSTRANS needs to know some details of how the SRS was computed. If it was computed by imat_fn/srs, these details are stored in SPECFUN automatically. The damping coefficient is stored in .IDLine3. If it is not specified there in the form '#.## %damping', you must specify it in DAMPING. The .ReferenceDir property specifies the summation method. It should be one of (pos, ppri, cres, cpos, neg, npri, nres, cneg, maxi, mpri, or mres). If it is not, 'maxi' will be used.

If SPECFUN is a FCN, the interpolation type is stored in .InterpolationType. Otherwise, it is stored in .UserValue4 as an integer (0=linlin, 1=linlog, 2=loglin, 3=loglog). If .UserValue4 is not an integer 0-3, linlin is assumed.

SPECFUN is a scalar imat_fn containing a Shock Response Spectrum.

DAMPING is the damping coefficient (critical damping factor) used for computing equivalent transient. If the value is empty or outside the range of [0.0 1.0], damping will be extracted from .IDLine3. If it is not specified there, an error will occur.

DELTAT is the time increment to be used in the equivalent transient function. For best results it should be small enough to capture at least 10 points per cycle at the maximum evaluation frequency.

DURATION is the total length of the equivalent transient function.

INTERPFREQ is a cell array. If the cell array is empty, the frequencies at which the error between the spec and the equivalent transient will be compared is taken from the abscissa of SPECFUN. If the cell array is not empty, the first cell contains a vector of frequencies at which the spec and equivalent transient will be compared. If there is a second cell, it contains a string identifying the method for interpolating SPECFUN. It must be one of 'linlin', 'linlog', 'loglin', or 'loglog'. This overrides the interpolation type specified in SPECFUN.

OPTIONS is an optional 2x1 array containing the maximum number of iterations (default=100), and user-specified tolerance for convergence of RMS error (default=0.01).

If the string 'interactive' is supplied, the function runs interactively, plotting candidate functions for the user's acceptance/rejection by graphical prompt. SRS2TRANS plots the transient in one graph window and the SRS spec (blue) overlayed with the transient SRS (orange). The transient appears in another window. If the RMS is less than the specified RMS tolerance, SRS2TRANS will quit.

The optional input string 'noprogbar' suppresses the progress bar.

'ntc' is an optional string that changes how the decay rate for the sum of decayed sinusoids is formulated. It must be followed by a numeric scalar NTC specifying the number of time constants to occur over the duration of the transient. A higher number of time constants increases the rate of decay. When not provided, the decay rate for each damped sinusoid is specified as the sinusoid's angular frequency times the SRS damping coefficient. Use this option to control the decay rate of the transient independently of the damping coefficient specified for computing the SRS.

OUTTRANS is an imat_fn containing the transient from the lowest RMS error iteration. OUTSRS is an imat_fn containing the SRS corresponding the lowest RMS dB error iteration. OUTERR contains the RMS value of the lowest RMS dB erroriteration.

See Also

imat_fn/srs