Generate transient from Shock Response Spectrum.
outtrans=srs2trans(specfun,damping,deltat,duration,interpfreq)
[outtrans,outsrs,outrms]=srs2trans(specfun,damping,deltat,duration,interpfreq,options,'interactive')
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 error between the spec SRS and the SRS of the equivalent transient. SRS2TRANS will plot the transient in one graph window and the SRS spec (blue) overlayed with the transient SRS (green) in another window. It will also list the RMS error in the command prompt window. If the RMS is less than the specified RMS tolerance, SRS2TRANS will quit.
SPECFUN is a single imat_fn containing a shock response spectrum. DAMPING is the damping coefficient (critical damping factor) used for computing equivalent transient. If the value is less than 0.0, default damping will be used. The default value is derived from IDLine3. SRS2TRANS looks for a string of the format set by the SRS method.
If the interpolation method is not specified by INTERPFREQ, UserValue4 of SPECFUN is used. If UserValue4 of SPECFUN does not contain an integer between 0 and 3, the default interpolation will be used (linear on both axes). To compare transient functions back to the original shock response, an SRS is computed. It is useful to compare SRS functions computed in the same way. So, if SPECFUN has a REFERENCEDIR property that has one of the following values (pos, ppri, cres, cpos, neg, npri, nres, cneg, maxi, mpri, or mres), the SRS calculation will use that option. If REFERENCEDIR contains some other string, the default 'maxi' will be used.
******* 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 ******
DAMPCOEF is the critical damping factor associated with the SRS. It must be a real number between 0 and 1.
DELTAT is the time increment to be used in the equivalent transient function. 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 will be taken from SPECFUN. If the cell array is not empty, the first cell will contains an array of frequencies at which the spec and equivalent transient will be compared. If there is a second element of the array, it contains a string identifying the method for interpolating SPECFUN. If this cell does not contain a string, the interpolation type specified by SPECFUN will be used. The interpolation type is specified in the UserValue4 property. The default interpolation type is linear for both axes.
OPTIONS is an optional 2x1 array containing the maximum number of iterations (default=100), and user-specified tolerance for convergence of RMS error (default=1.0). If the string 'interactive' is supplied, the function runs interactively, plotting candidate functions for the user's acceptance/rejection. Otherwise, the function will iterate a set number of times without providing any visual feedback.
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 error iteration. OUTRMS contains the RMS value of the lowest RMS iteration.