Fatigue User’s Guide > Fatigue Utilities > File Conversion Utilities
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
File Conversion Utilities
Various additional file manipulation and translation modules are also available.
Binary/ASCII Convertor - (MDTA/MATD)
MDTA - Binary to ASCII
The MSC.Fatigue signal to ASCII module, MDTA, converts a single parameter, X-Y, or histogram binary file into ASCII format.
It can also write or omit header details, and write an ASCII file as single or multiple column.
MDTA is complimentary to module PTIME which can convert ASCII files to binary files.
Signal files cannot be easily examined on a terminal or printing device because they are in binary format. For the same reason they are difficult to manually edit (in a word processor for example). However, ASCII files can be viewed or printed easily because they are letters and numbers. MDTA provides the means to quickly and easily produce an ASCII version of many MSC.Fatigue signal files.
The resultant ASCII files are meant to be read by PTIME and are not a generic file type.
The header of the input signal file can also be converted (or omitted) and MDTA can write multi or single column.
Note that any extra details area data within the .dac file will be lost in this process. In order to retain such keywords, write them out to a separate ASCII file, then import them into the data file using MFILMNP.
If multi-column is chosen the program will attempt to fit as many values onto a line as possible. This will minimize the ASCII file size. The alternative is single column whereby each value (or pair of values for X-Y files) will be written to a new line.
If two parameter files are to be created from a single parameter file then MDTA can read the header information of the input .dac and create a second data column of X values e.g. time.
Numbers in an ASCII file are delimited (separated) by 1 of 3 characters from the ASCII character set. These are the space, comma, or tab.
The file types supported are:
1 Parameter: .dac, .psd, .acf, .ada, .asd,, .pvx, .sxx, .sxy, .syy
Histogram: .cyh, .dhh, .hst, .san
X-Y (2 Parameter): .mdf, .css, .sl, .fal
The above table is not necessarily exhaustive.
MATD - ASCII to Binary
The ASCII to signal module, MATD, converts an ASCII text file into a format binary data file, for example a 1 parameter .DAC file.
MATD processes files of data in ASCII format and converts them to binary format files that can, for example, be plotted in MQLD or MMFD.
MATD's complementary module is MDTA which converts binary to ASCII.
There are three options/modes of operation from ATD's main menu:
1. Single channel file conversion
MATD can convert single parameter time history files, paired data files, and histograms. If the data came from MDTA then header details are automatically used.
MATD can convert non-equally spaced data, and can selectively choose or ignore data from a file as required. This selectivity is made possible by the user supplied parameters, explained in the Module Operation section.
2. Multi-channel file conversion
This option extracts many channels of data from an input file simultaneously. The data must be sequential (i.e., time history format).
The program will need the following information to be supplied:
The number of channels in the input file
A list of channels to be demultiplexed
The sample rate of the data
The base offset of the data
For each channel, its X and Y axes' units and labels
The information may be input using the keyboard or from an ascii file (hereafter referred to as a general setup file). The format of the general setup file is shown at the end of this technical overview.
3. Chart logger (dAtagate) file conversion
This option extracts many channels of data from an input file created by the dAtagate chart logger (from now on referred to as a chart logger).
The program will normally take the default setup from the chart logger's setup file, however, a general setup file may also be used.
Spreadsheet
For multi-channel demultiplex operations a spreadsheet facility is offered for specifying and editing the default X and Y axes labels and units.
MDTA Module Operation
The MDTA module can be run in one of the following 3 modes:
From the File Conversion Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
In stand-alone mode by typing mdta at the system prompt
By incorporating the MDTA commands in a batch operation
Once running in interactive mode the MDTA module prompts for the following input. The purpose and usage of each field is explained below. Note that until Input File Name is completed and confirmed (by clicking OK) then none of the other fields are active.
 
Option
Description
Input File Name
In this field the user should type the name of an input binary file (often a single parameter .dac file). By default MDTA assumes a .dac file extension but if a file with a different file extension is to be processed then enter the File Name plus extension in full. Two parameter files and histogram (3 parameter) files can also be processed.
MDTA will expect to find the input data files resident in the user’s directory. However, other directories can also be accessed if the complete file specification path name and file name are entered. Probably the easiest way to name an input file is to use the pick List facility.
Output File Name
In this field the output ASCII file must be named. The file extension will by default be .asc although if a different name and extension is entered here then the alternative extension will be used.
By default MDTA uses the input file name as the output file name (the file extensions will be different). If a file with the same name as he proposed output file name already exists on the target drive and directory then MDTA will prompt the user for permission to overwrite the existing file.
Write Header Yes/No
MDTA can optionally write the header details to the ASCII file. If the ASCII output file is subsequently converted back to binary (by module PTIME) then the header information will also be converted. This MDTA/PTIME pairing is useful, for example, if a binary header needs to be edited and then re-converted back to binary.
The header details will occupy their usual fixed 20 first lines of the file.
Multiple Column Yes/No
If multiple column is selected, the program will attempt to fit as many values into a line as possible. If no value is selected then every data value X-Y pair will be written on a separate line (although the ASCII file will be larger).
Separator
This field enables the user to select which of three ASCII characters will be used to delimit or act as a boundary marker, between the data values.
Include X-Values?
If two parameter files are to be created from a single parameter file then MDTA can read the header information of the input .dac and create a second data column of X values e.g. time
MDTA Batch Example
MDTA can be invoked in all the standard batch modes. A typical batch command line would be:
mdta /inp=saetrn/out=saetrn/ov=y/mul=y/del=t
In this case, MDTA would convert a data file called saetrn.dac. The results would be written to a file saetrn.asc and this file would be overwritten if it already existed. The ASCII file will be multi- column with tabs as delimeters.
A list of MDTA’s batch keywords:
 
/INPut
The input file name. /INP=FILE
/OUTput
The output file name required for the results data file. /OUT=RESULT
/OVerwrite
Whether to overwrite an existing results file. /OV=Y
/HEADer
Whether to write header, Yes or No. /HEAD=Y
/MULtiple
Whether to write multiple columns (or single) Yes/No. /MUL=Y
/DELimiter
The delimiter character Space, Comma, Tab /DEL=C
MATD Module Operation
The MATD module can be run in one of the following 3 modes:
From the MSC.Fatigue Pre & Post Tools pulldown menu system
In stand alone mode by typing matd at the system prompt
By incorporating the MATD commands in a batch operation
Once running in interactive mode the MATD module appears allowing access to the three modes of operation.
Mode 1 - Single Channel
The following input is available for Single Channel operation:
 
Option
Description
ASCII Filename
This field asks for the name of an ASCII text file data to be converted to a time series file format .DAC file. The assumed file extension is .ASC though other file extensions and pathnames are accepted if they are entered explicitly.
Use the pick list facility to select an input file. Note that until this field has been completed, none of the other fields will appear.
Output Filename
This requests the name of a time series file (e.g. *.DAC) as the output of the ASCII to DAC conversion process. The generic name of the input file is offered as default, and if the output file already exists in the specified directory, the user will be asked to confirm that it may be overwritten.
Sample rate
Enter the sample rate on points per second (Hz). The default is 1 Hz, or the value in the macro of the ASCII if it was made by DTA, or if the keyword ATDSAMP is set in the environment then any values associated with that keyword are used. If the time increment is known then the sample rate is the time rate's reciprocal.
Equally Spaced Data ? Yes/No
MATD can convert two types of ASCII data file:
Where the data consists of values only, where the values are assumed to be equally spaced apart in time. If the time values are present in this case, they may be omitted provided the correct sample rate is entered. (a single parameter file)
Where both time and values are present, and the time values are not equally spaced. The data is assumed to be formatted with a time followed by a value sampled at that time. This is the two parameter file type.
The user must answer Yes if the data format is like that of 1) above, or No if the data format is like that of 2) above. If Yes is entered and Take All Numbers = No, then the following fields appear. Start Position for Accepting, Number of Values to Skip, and Number of Values to Take.
Header Lines to Skip
The ASCII text file being used as input to MATD may have some header lines containing information about the data rather than data itself. The user is requested to enter the number of lines of header the program is to ignore as valid data lines. The default is determined by the environment keyword ATDSKIP, which MATD both sets and reads in the local environment. It may be necessary to view the ASCII file to count the header lines. If the ASCII file was produced by the module MDTA then the correct number of header lines to skip to recreate the original signal file is 20.
Take All the Numbers [Y/N]
The conversion program is only interested in data points and not in any other numbers which may be in the file, such as time base values. This question is asking whether all the numbers in the ASCII file are to be used or whether some are to be ignored. When the file is a file of time-data value pairs where the time values are NOT equally spaced then answering Yes will cause MATD to treat all data as time-value pairs. If No then ATD will ask for the time column number and the data column number.
Start Position for Accepting
This field appears if Equally Spaced Data=Yes and Take All Numbers=No.
If the user wishes to skip some data values in the file, for example in the case of a multiplexed ASCII file such as:
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8
etc. (8 channels)
Each channel may be taken out one at a time by specifying the start location of the channel. In this case, for channel 4, selecting a start value of 4 and the skip value (next question) of 7 (skip 7 values before the next data value for channel 4), will convert only the ASCII data for channel 4. The default is to begin taking data at the first value.
Number of Values to Skip
This field appears if Equally Spaced Data=Yes and Take All Numbers=No
If the user wishes to skip some of the data values in the file, then the number of values to skip at any one time must be given in response to this prompt. For example, if the file is like this:
1
2.5
2
3.45
3 etc.
and the values 1,2,3 are not required, then the number to skip is 1. The default value is 0, meaning do not skip.
Number of Values to Take
This field appears if Equally Spaced Data=Yes and Take All Numbers=No. If the user wishes to skip some of the data values in the file, then the number of values to accept at any one time must be entered at this prompt. For example, if the file is like this:
1
2.5 3.5 4.5
2
3.45 4.2 3.1
3 etc.
and the values 1,2,3 are not required, then the number to skip is 1 and the number to take is 3. The default number to take is 1. If Equally Spaced Data = No, then Start Position for accepting, etc., does not appear. They are replaced by Time Column and Data Column.
Time Column
This field appears if Equally Spaced Data=No and Take All Numbers=No. If non equally spaced data is in the input file then the program needs time value pairs. If the file has multiple data columns, the user must specify which column is time. Therefore, in this field the time column number is entered. MATD will assume that each line has the same number of columns.
Data Column
This field appears if Equally Spaced Data=No and Take All Numbers=No. In addition to knowing which is the Time Column, MATD must also know which is the Data Column.
Y-Axis Label/Units
All screen displays contain these two fields. The label for the Y-Axis is Magnitude and Volts by default, however the user can enter any 28 characters in these fields should they wish to change the Label/Units. Having completed all inputs, MATD begins the data conversion and gives the following on screen message.
Mode 2 - Multi Channel
The following input is available for the multi-channel operation:
:
Option
Description
General Setup Filename
The name of a general setup file should be entered into this field. General setup file usually take an .ATD extension and this will be assumed if none is given. If the field is left blank it will be assumed that the program is to create a temporary default setup for the demultiplex operation. A list of .ATD files is offered by pressing the pick list button or by clicking the mouse on the LIST button. A file may be selected from this list.
ASCII Data Filename
The name of the ASCII data file should be entered into this field. ASCII data files usually contain a number of header lines followed by the data to be demultiplexed. The standard extension for this type of data file is .ASC and this will be assumed if none is entered. A list of .ASC files is given by clicking the pick list button); A file may then be selected from this list.
Generic Output Filename
A generic file name for the output filenames should be entered here. The output filenames are created by appending the channel numbers to the filename and adding a .DAC extension, e.g., Demultiplexing channels 1, 5 and 6 using a file stem FRED will produce the following output filenames:
FRED01.DAC - Contains data from channel 1
FRED05.DAC - Contains data from channel 5
FRED06.DAC - Contains data from channel 6
Header Lines to Skip
The standard ASCII data file may optionally contain a header area proceeding the data to be demultiplexed. This question asks for the number of lines of text comprising the header area. The first non-blank line after this area is then assumed to be the start of the data to be demultiplexed. The default is determined by the environment keyword ATDSKIP, which MATD both sets and reads in the local environment. If the ASCII data file does not contain any header information then the answer to this question will be 0.
Number of Chans in File
This question is asking for the number of channels, NCHANS, defined in the data file. The program can then synchronize the data knowing that a new sample begins after every NCHANS data values in the input file. The channels are numerically tagged, incrementing sequentially from 1 to NCHANS (i.e. if 4 channels are defined these are tagged 1,2,3,4). Channels are subsequently referred to by their numerical tag. If a general setup file is being used the default number of defined channels offered in this field is taken from this file.
Sample Rate of Data
This question determines the sample rate of the data. It must be the same for all channels. The sample rate is defined to be the number of samples per channel per second. It is also the reciprocal of the time increment between each sample of a given channel. If a general setup file is being used the default sample rate offered in this field is taken from this file. If no setup has been nominated the default value offered is 1 unless the keyword ATDSAMP is in the environment in which case its associated value is used.
Base Offset of Data
This question determines the X-Axis base offset of the data. Most commonly this means the time at which the first data in the input file was sampled and it usually has a value of zero. It must be the same for all channels. If a general setup file is being used the default value for the base offset is taken from this file. If no setup is being used a default value of 0.0 is offered.
Demultiplex Channel List
The list of channels to demultiplex is entered in this field. The input may be entered using the keyboard as follows:
1,5,7-10 - selects channels 1,5,7,8,9 and 10
ALL - selects all channels in data file
DEFAULT - uses the default channel list from the setup file or
ALL channels if a setup file is not being used
Alternatively, the channels may be selected from a list of all active channels offered by pressing the pick list button or by clicking the mouse over the CHAN button. The word <SELECTED> is written to the field to denote a list of channels selected this way. The number of channels selected is displayed below this field. When all the above fields have been filled, ATD will use the spreadsheet function to display the units and labels for each channel. The spreadsheet function is explained four pages ahead.
Mode 3 - Chart Logger
The following input is available for the chart logger operation:
 
Option
Description
Logger Setup Filename
A chart logger setup filename should be entered into this field. Logger files take a .SET extension (this is implied if none is given). Files with other extensions are assumed to be general setup files. If the field is left blank it will be assumed that the program is to create a temporary default setup for the demultiplex operation. A list of .SET files is offered by clicking the mouse on the LIST button. A file may be selected from this list.
When the logger file has been selected the following items are requested:
Logger Data Filename
The chart logger data filename should be entered into this field. Chart logger data files take the extension .PRN and this will be assumed if none is entered. A warning is issued if the specified file does not exists. A list of .PRN files is given by pressing the pick list button. A file may then be selected from this list.
Generic Output Filename
A generic stem for the output filenames should be entered into this field. The output filenames are created by appending the channel numbers to the filestem and adding a .DAC extension, e.g., Demultiplexing channels 1,5 and 6 using a file stem FRED will produce the following output filenames:
FRED01.DAC - Contains data from channel 1
FRED05.DAC - Contains data from channel 5
FRED06.DAC - Contains data from channel 6
Header Lines to Skip
MATD would fail if it attempted to start extracting data in the header region of the input file. So, because the header region consists of a discrete number of lines at the top of the file, it is possible to instruct MATD to skip that number of lines before data extraction will begin. The default is determined by the environment keyword ATDSKIP, which MATD both sets and reads in the local environment.
By default MATD will skip whatever number of header lines it encounters in the input file. Also, because ASCII files can be loaded into a text editor, it is possible to manually count the number of lines that need skipping in order to answer this question.
Number of Chans in File
This question is asking for the number of channels, NCHANS, defined in the data file. The program can then synchronize the data knowing that a new sample begins after every NCHANS data values in the input file. The channels are numerically tagged, incrementing sequentially from 1 to NCHANS (i.e. if 4 channels are defined these are tagged 1,2,3,4). Channels are subsequently referred to by their numerical tag. If a general setup file is being used the default number of defined channels offered in this field is taken from this file.
Sample Rate of Data
This question determines the sample rate of the data. The sample rate is defined to be the number of samples per channel per second. It is also the reciprocal of the time increment between each sample of a given channel. If a general setup file is being used the default sample rate offered in this field is taken from this file. If no setup has been nominated, the default value offered is 1 unless the keyword ATDSAMP is in the environment in which case its associated value is used.
Base Offset of Data
This question determines the X-Axis base offset of the data. Most commonly this means the time at which the first data in the input file was sampled and it usually takes the value 0. If a general setup file is being used the default value for the base offset is taken from this file. If no setup is being used a default value of 0.0 is offered.
Demultiplex Channel List
The list of channels to demultiplex is entered in this field. The input may be entered using the keyboard as follows:
1,5,7-10 - selects channels 1,5,7,8,9 and 10
ALL - selects all channels in data file
DEFAULT - uses the default channel list of setup file or ALL
channels if a setup file is not being used
Alternatively, the channels may be selected from a list of all active channels offered by pressing the pick list button. The word <SELECTED> is written to the field to denote a list of channels selected this way. The number of channels selected is displayed below this field. When all the above fields have been filled MATD will use the spreadsheet function to display the channel units and labels for each channel (see next section). Exiting from the spreadsheet editor will initiate the demultiplexing operation (after the user has confirmed this action). During logger file demultiplexing, lines containing errors will cause a temporary halt with a message to select one action from Remove, remove All, or Exit. Any lines removed in this way will be written or appended to a test file, ATDERR.LOG, for subsequent viewing.
The MATD Spreadsheet
There are three main areas on a spreadsheet screen:
1. The data area itself which consists of rows and columns of data cells.
Column A contains the channel number It can contain numerical designations for up to 256 rows. These labels can NOT be edited.
Column B contains the X-axis labels. Values can be edited. See the Copy function for details of quick global edits.
Column C is the X-axis units and columns D and E contain the corresponding values for the Y-axis.
2. The edit window at the bottom of the screen. It contains temporary or volatile data, such as the data value currently highlighted or being edited.
3. The header bar across the top of the screen which contains the buttons for manipulating the data and navigating around the columns and rows. All of the buttons have keys mapped to a function, as described in the footer.
Most of the operations in the header bar are self evident. Those that are not are listed here:
 
Option
Description
OK
When the edits have been made this option quits the spreadsheet environment and starts the demultiplexing operation.
Back
This option quits the spreadsheet environment and returns to the previously viewed screen.
Set Verifications Off
Suppresses the less crucial verification requests. For example the verification for restoring a snapshot will not be asked.
Set Channel Substitution String
This option allows a string to be defined such that wherever it is encountered as a substring in any channel label or unit it represents the channel number. For example, assume the channel substitution string is set to "nn" and the Y-labels for channels 3,57 and 92 are set as follows:
3:Strain Gauge nn
57:Serial No PK00nn
92:Channel-nn
The actual labels written to the output files will be
Strain Gauge 3
Serial No PK0057
Cha92el-92
Note that the substring, nn, is obviously inappropriate since it produces an unrequired substitution in the word Channel.
SNAPSHOT
Causes the current spreadsheet values to be remembered. The values are reinstated by using the restore option. A snapshot is automatically taken when the spreadsheet is first entered.
RESTORE
Spreadsheet values are re-instated to those stored when the last snapshot was taken. Verification is only required if the verify preference is switched on.
MATD Batch Operation and Setup Files
MATD can run in batch mode because the spreadsheet operations are inherently interactive and are not available in batch. In the absence of interactive instructions, Setup files in which the interactive instructions are preprepared are used. Setup files are described here.
 
Option
Description
Chart Logger Header Files
The default setup for chart logger data is taken from the corresponding .SET file. However, it is permitted to use an .ATD setup file if required.
No Setup File
If no setup file is nominated then all input fields corresponding to demultiplex parameters are initialized to NULL thus forcing values to be entered.
General, .ATD, Setup files
The general setup file will be structured as follows.
The first line of the file will distinguish an MATD general setup file from other files:
MATD General Setup File: Created 5/2/95 for testing with MYDATA
The characters up to and including the colon form the identification string. All characters after this colon are optional and are ignored.
All remaining lines of importance will contain recognizable tokens followed by their associated parameters.
TOKENS / Example
<NHEAD> 12 The number of header lines preceding the data
<SRATE> 0.01 The sample rate
<XBASE> 0.00 The x-base offset
<XLAB> 3, Time The channel number (3) followed by the label
<YLAB> 3, Strain The channel number (3) followed by the label
<XUN> 3, Seconds The channel number (3) followed by the units
<YUN> 3, uE The channel number (3) followed by the units
<NCHANS> 4 The number of channels in the data file
<DMXLST> 2,3 The list of channels to be demultiplexed
<SUBSTR> nnn The channel number substitution string
<LOGMAP> 1-9,17,18 The logical channel mapping information used
when saving information from a logger setup
file to a general setup file.
A minimal specification in a general setup file must contain values for the sample rate, base offset, number of channels and the list of channels to be demultiplexed. The file format of general setup files is rigid and the following rules must be observed when they are created:
1. Tokens must be delimited by triangular brackets < >
2. The only tokens recognized are those listed above. Any unrecognized token will be assumed to be the result of misspelling and will cause an error.
3. Any line not beginning with a token is ignored and treated as a comment.
4. Token lines must contain their corresponding parameters. Labels and units may seem not to be specified in some files where their values comprise solely of white-space (TAB characters and spaces).
5. Lines containing tokens should not contain any other information other than the token's associated parameters.
6. In the example above channels 2 and 3 are to be demultiplexed from a 4 channel file, however, the units and labels for channel 2 will be initialized to NULL because they have not been defined.
7. The following tokens may appear more than once to allow the specification of information to be spread over several lines of the setup file which otherwise would result in a line too long to fit within screen viewing limits:
<DMXLST>
<LOGMAP>
• An error is invoked if the setup file contains any of the tokens in the following list more than once:
<SRATE>
<XBASE>
<NHEAD>
<NCHANS>
<SUBSTR>
A list of MATD’s batch keywords:
 
/INP
File name of the ASCII file to convert (.ASC) /INP = AERO
/OUT
File name of the output signal file (.DAC) /OUT=AERO
/OV
Whether it overwrites the existing output filename /OV = Y
/SPA
Whether the data is equally spaced in the frame /SPA = N
/HEAD
Number of header lines to skip /HEAD =
/ALL
Whether to take all the numbers in the file /ALL = N
/STA
The start position for accepting /STA = 10
/SKIP
How many values to skip /SKIP = 4
/TAKE
How many values to take /TAKE = 1
/SAM
Sample rate for the output file /SAM = 2
/UNI
Units for the output file /UNI= mV
/XBASE
Base offset of X-axis
/LAB
Output file label /LAB = Title
/TCOL
Time column /TCOL = 2
/DCOL
Data column /DCOL = 2
/SETup
Setup filename.
/INPut
Input filename.
/OUTput
Output filename.
/NCHANS
Number of active channels in data file /NCHANS=8
/CHAnnels
List of channels to be demultiplexed.
/ERRACT
Action to take if multichanel datafile has errors (R, A, X)
/MISDAT
Action to take if multichannel samples not complete (Z, R, X)
Signal Regeneration - (MREGEN)
MREGEN can:
regenerate a single parameter signal file (.dac extension) from a three parameter range-mean cycles histogram file (.cyh type).
regenerate a single parameter signal file (.dac extension) from a three parameter maximum-minimum cycles histogram file (.cyh type).
regenerate a single parameter signal file (.dac extension) from a three parameter Markov Matrix (.mkh type).
generate a Gaussian series from a user supplied irregularity factor and save it as a .dac file.
generate a random time history (.dac) from input psd.
The cycles histogram files are, in the first instance, created from single parameter files and the creation process loses time information (sample rate and frequency). Because of this loss of original information, MREGEN produces an approximation of the input file, i.e. with the same number of cycles at each specific range and mean.
The only output file is the signal (.dac) file regenerated from the input cycles histogram.
The plots in Figure 13‑49 compares a regenerated file with its original.
Figure 13‑49 The Original .dac File, (Bottom) Compared to the Regenerated File (Top)
The regenerated file is similar to the original (compare the statistics to the right of each plot) except for the fact that the sample rate is wrong; the original was 204.8 samples/sec and the new file was assigned the estimate of 200 sample/sec. MREGEN always allows the user to enter a sample rate because it cannot be calculated from a .cyc or .mkh file because time information is lost. The default time allocated is 1 sample/sec.
Rainflow Reconstruction:
The MREGEN module constructs a peak-valley sequence from two types of rainflow matrix, one where the cycles are stored in the matrix according to their range and mean, and another where they are stored by their maximum and minimum (peak and trough). In the case of the range-mean type of matrix, the data is converted from range-mean to max-min format before the reconstruction occurs. This results in a slight inaccuracy when the resulting regenerated sequence is cycle counted and compared with the input matrix. This inaccuracy is due to the overlap of range-mean and max-min matrix bins, i.e. a cycle from a particular range-mean bin may lie in one of four max-min bins. Care must therefore be taken when comparing results from a regeneration from a range-mean matrix.
Once a max-min matrix has been obtained, either directly or by conversion from range-mean, the regeneration process may begin.
The procedure for regeneration is as follows:
1. Find the largest cycle, that is the one inside which all other cycles will hang or stand. Generate three points to define this cycle. Use a random number to determine whether the cycle is min-max-min or max-min-max. If there is more than one entry in the bin, generate 2n+1 points for n entries in the bin.
Use the user-supplied method to generate the data value from the bin location. The extreme option chooses the largest possible maximum and smallest possible minimum. The mean option uses the value from the centre of the bin and the random option selects a random location within the bin.
2. For all other bins with non-zero entries, obtain the maximum and minimum value of the cycle classification. Find all the possible locations for this cycle to be inserted within the current regenerated sequence. A possible location is defined by the ability to fit the new cycle inside two consecutive existing samples. For example, in the following sequence we are trying to fit a cycle whose maximum is 100 and minimum is -100.
Existing sequence: 500 (A),-500 (B),100 (C),-50 (D),250 (E),-300 (F), 300 (G).
In this case there are 4 possible locations, between A and B, B and C, E and F, F and G. It is not possible to insert the cycle between C and D or between D and E and create the correct sequence. Note that 'equal to' is allowed, as in the case of B to C.
A random number is then used to determine which of these four locations to use. The data to the right of the pair of points, including the right hand point, is then shuffled right to leave a two point gap into which the cycle can be placed. The points are then inserted in the correct sequence to retain a peak-valley order. In the above example if the second pair (B-C) were selected then points C-G would be moved right and the values inserted to give the following sequence:
New sequence:
200 (A),-500 (B), 100(new), -100 (new), 100 (C),-50 (D),250 (E),-300 (F), 200 (G).
This procedure is repeated for the number of cycles in the bin.
The process then continues until all non-zero bins have been handled.
To obtain satisfactory speed performance, memory management and extensive software optimization is performed. This leads to a possible limitation on some machines of a maximum of 800,000 cycles in the regenerated sequence. This requires 10Mb of actual or paged memory. On UNIX systems the number of cycles which can be regenerated in one go is limited to the amount of memory available to the user.
When the sequence is written from memory to disk, the first point written to the file is selected randomly from within the complete sequence. This method is based on the paper in reference (Ref. 39).
Markov Transition Matrix Reconstruction:
When regenerating a data stream from a Markov Transition Matrix, there are two approaches, firstly to reconstruct segments which result in an exact match when a Markov count is performed on the regenerated samples. Secondly, it is possible to regenerate a sequence of any length whose transition matrix has the same characteristic as the original.
To understand this last approach, consider the Markov matrix as a joint probability matrix. In this matrix, each bin represents the probability that the next data point will be selected from that bin, given that the current point is known. The additional restriction is that from a minimum (valley) point, the next sample must be from a bin greater than the current bin, and similarly for a maximum (peak) value the next data point must be from a bin whose value is less than the current bin.
The algorithm normalizes the transition matrix to be a joint probability matrix and then selects a random start point. The start point is selected randomly, but in such a way that the algorithm will proceed correctly. Subsequent samples are generated by a random value shaped by the probability distribution. This will continue to an indefinite number of samples provided that the Markov Transition matrix was valid. If the matrix was invalid, it may be possible to arrive at a bin with no valid bin to go to. In this case an error will be generated. As the sequence becomes longer, the distribution of the regenerated samples will more closely resemble the original distribution.
Irregularity Factor Reconstruction:
The irregularity factor of a data stream is defined as
(13‑1)
Note that the band width, E, is defined as
(13‑2)E =E=
So when =1 and E= 0 the data is pure narrow band. When gamma=0 and E=1 the data is pure broad band and when 0< <1 the data is wide band.
Kowalewski (Ref.40.) proposes a method by which a joint p.d.f. may be generated from a single value of gamma. The algorithm uses this method to generate the p.d.f. and then regenerates a sequence of peak valleys by the method defined in the section on Markov Transition Matrix Reconstruction. The Kowalewski p.d.f. is normalized in the X, Y and Z axes so the output data is scaled to the values entered by the user.
Module Operation
The MREGEN module can be run in one of the following three modes:
From the File Conversion Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
In stand alone mode by typing mregen at the system prompt
By incorporating the MREGEN commands in a batch operation
Once running in interactive mode, the MREGEN module will display the four options listed below.
 
Option
Description
Regenerates a .dac files from a range-mean rainflow matrix (.cyh). As pointed out in the technical overview, this type of regeneration has to go via an intermediate maximum-minimum stage and is as a consequence 3% less accurate than the maximum-minimum option.
Regenerates a .dac file from a maximum-minimum rainflow matrix (.cyh) file.
Both the above methods accept .cyh files as their input and MREGEN cannot guarantee that it is the correct type unless it was created from another MSC.Fatigue module (Range-mean or max-min is identified in the header). The wrong input type will probably cause an error message to be output at some stage but this can NOT be guaranteed.
Regenerates a .dac files from a from-to Markov transition matrix. It takes a Markov Transition matrix and converts it to a joint peak-trough probability density function (p.d.f.) from which a variable length time series may be reconstructed. The reconstructed history will have the same, or similar, peak trough p.d.f. to the original data. It does not reconstruct exact transition segments.
Generates a Gaussian distribution from a user supplied irregularity factor.
Range-Mean Rainflow Matrix
This option requires the following input.
 
Option
Description
Input File Name
The name of the file from which a .dac file is to be regenerated must be entered here. The List button will automatically look for files with the correct extension depending upon what was chosen in the Input Type field above.
Output File Name
The name of the .dac file to be regenerated must be entered here. By default it will have the same name as the input file, but a .dac extension. MREGEN will ask for permission before overwriting any existing files.
Bin value Position Extreme\ Mean\Random
When a matrix element is selected to reconstruct a time history value, the value itself may be determined from any part of the bin. Three cases are offered here: Select the extreme edge of the bin (maximum for peaks, minimum for troughs), the mean value (centre of the bin), or a random location.
Sample Rate
This field specifies the sample rate of the output .dac file. Because the rainflow process loses all time information it is necessary to supply it in this field, which will allow a new time series (.dac) file to be created. Note that the new time series is really a peak valley sequence with a single cyclic frequency equal to half the supplied sample rate.
Seed
The number seed can be one of two types: Random or User defined. If it is random then the program will generate a pseudo-random number as the seed (it will in fact repeat after a very large number of cycles). For repeatable results it should be the same seed value for each run of the program, hence the option of the user entering a seed number.
Seed Value
This field only appears if Seed is set to User generated. It has been proved that the best seed is an odd number.
Max-Min Rainflow Matrix
The input fields for this option are all the same as for Range-mean Rainflow Matrix, so please refer to the previous text for details of how to complete them.
Transition Markov Matrix
This option requires the following input.
 
Option
Description
Input File Name
Enter the name of the matrix from which a time history is to be regenerated. The default file extension is .mkh.
Output File Name
Enter the name of the time series file to be created. If this file exists, the program will ask whether the file may be overwritten. The default extension for this file is .dac.
Sequence length Points
Enter the number of points to be recreated. For reconstruction from a Markov matrix, the default value will reconstruct a sequence containing the same number of peaks and troughs as the input matrix.
Bin Value Position Extreme\ Mean\Random
When a matrix element is selected to reconstruct a time history value, the value itself may be determined from any part of the bin. Three cases are offered here, to select the extreme edge of the bin (maximum for peaks, minimum for troughs), the mean value (centre of the bin) and a random location.
Sample Rate
This field specifies the sample rate of the output .dac file. Because the rainflow process loses all time information it is necessary to supply it in this field, which will allow a new time series (.dac) file to be created.
Note that the new time series is really a peak valley sequence with a single cyclic frequency equal to half the supplied sample rate.
Seed
The number seed can be one of two types: Random or User defined. If it is random then the program will generate a pseudo-random number as the seed (it will in fact repeat after a very large number of cycles). For repeatable results it should be the same seed value for each run of the program, hence the option of the user entering a seed number.
Seed Value
This field only appears if Seed is set to User generated. It has been proved that the best seed is an odd number.
Irregularity Factor
This option requires the following input.
 
Option
Description
Output File Name
Type the name of the output .dac file that will be created.
Irregularity Factor
Enter the irregularity factor from which a transition matrix will be created. The irregularity factor is defined as the number of mean crossings divided by the number of peaks. The value lies in the range, 0.0 to 1.0 where 1 implies pure narrow band.
Y-Axis Label / Units
Type the Y-axis label and it's units (if any) of the output .dac file.
Maximum
Reconstruction from an irregularity factor generates a normalized probability matrix. To calibrate the time history, specify the maximum value which the time history may attain.
Sequence length
Enter the number of points to be recreated.
Sample Rate
Type the output file's sample rate (sample rate information is not part of the 3 parameter .cyh file). Note that the new time series is really a peak valley sequence with a single cyclic frequency equal to half the supplied sample rate.
Seed
The number seed can be one of two types; Random or User defined. If it is random then the program will generate a pseudo-random number as the seed (it will in fact repeat after a very large number of cycles). For repeatable results it should be the same seed value for each run of the program, hence the option of the user entering a seed number.
Seed Value
This field only appears if Seed is set to User generated. It has been proven that the best seed is an odd number.
Batch Example
A sample batch line is given below.
mregen /typ=r/inp=aero/out=reg_aero/sam=0.5/stype=r
Which will input aero.cyh and output a .dac file.
A list of MREGEN’s batch keywords:
 
/OPT
Input Type R,M,T,I,X
/INP
Input File Name. /INP=results.cyh
/OUT
Output File Name. /OUT=newfile.dac
/BINPOS
Bin Position - E,M,R
/SAM
Sample Rate in samples per second. /SAM=50
/STYPe
The type of random number seed; Random R or User defined U. /STYP=R
/SEED
The random number seed when STYP=U. /SEED=3
/SEQ
Sequence length
/BINPOS
Bin Position - E,M,R
/IRR
Irregularity Fact
/LAB
Y-Axis Label
/UNI
Y-Axis Units
/MAX
Maximum value
/MIN
Minimum value
/OV
Overwrite, Y/N
RPC to DAC - DAC to RPC - (MREMDAC/MDACREM)
The MREMDAC program extracts channels of data from MTS RPCtm remote parameter (RPC) files, and creates a single .dac file for each channel of the RPC file. It is possible to selectively extract one or more channel numbers. A time window within the RPC file may be selected which will apply to all channels extracted. Both RPC II and RPC III files may be processed. Full details of the extraction and creation process can be saved to a report file.
The MDACREM program combines a set of related .dac files into a single RPC file (‘remote parameter’) suitable for driving a test rig. The .dac files are often individual channels of a multi-channel data acquisition test.
 
Note:  
Damage may occur to a test rig if it is driven by an unsuitable RPC file. When creating an RPC file it is strongly recommended that the file is tested for validity within the RPC software suite before the file is used to drive a test rig.
There are several different forms of RPC files, particularly for RPC II. The subsections below briefly describe the types of file that can be processed by this program (see the MTS documentation for full details).
RPC II File Types
The files that can be processed are demultiplexed drive or response time histories. The data type must be 16 bit integer. This corresponds to MTS file types 00 or 100 with data type 00.
RPC III File Types
Any drive or response time history file can be processed.
Module Operation
The MREMDAC and MDACREM modules can be run in one of the following three modes:
From the File Conversion Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
In stand alone mode by typing mremdac or mdacrem at the system prompt
By incorporating commands in a batch operation
RPC to DAC Conversion (MREMDAC)
When first invoked, MREMDAC, only the Remote Parameter File field will appear. When a name has been supplied the rest of the fields appear.
 
Option
Description
Remote Parameter File
The first field is the name of the RPC file to convert. The default extension for the RPC file name is .rsp, and the file is assumed to reside in the current working directory. A file name may be picked from a list by clicking on the pick list button. Once the RPC file name has been entered, the remainder of the input fields are displayed on screen. These fields are described below.
Data Channels
This field allows the channels required for extraction to be specified. Channel numbers may be entered directly into the field by entering them in the form
1,3-5,10-15 etc. 
where the hyphen indicates an inclusive range of channel numbers. The word 'ALL' may be entered in the field which indicates that all the channels in the RPC file should be processed. Click on LIST to pick one or more channel numbers from a list of those which exist in the RPC file. In this case a screen will be presented. The vertical list shows all the channels which exist in the RPC file. One or more channels may be individually tagged (selected with the mouse). Pressing the T key over an already tagged channel will untag it. Use the A key to tag all channels, or U to untag all channels. Select the Accept option when all the required channels have been tagged.
Output File Root Name
One output file is created for each channel extracted from the input file. The output file names are constructed as <root name> <channel number>.dac where the <root name> is the name entered in this field. This name will be the same for all the output files. The channel number occupies two or three digits, padded with a preceding zero if required.
Output File Extension
This field allows the extension of the output files to be specified. The default offered is .dac, which is the standard extension of MSC.Fatigue time series data files. Any other three letter extension may be entered if required.
Report Selection
If this field is set to Yes, then a report file will be generated during processing, which contains a list of the channels which have been extracted, with their channel descriptions and units. Also a table of the statistics of each of the extracted channels is written to the file. The report file will have the same name as the root name specified above, but a file extension of .lst. It is a text file which may be printed if required.
Window Selection Method
It is not necessary to extract the complete signal for each channel from the RPC file. A time window for extraction can be specified by entering the start and end position. The start and end position may be specified either as times in seconds measured from the start of the data file, as point numbers counted from the start of the data file, or as frame numbers, also counted from the start of the data file. At the bottom of the screen the length of the data file in terms of time, points and frames is displayed. This field requests the method by which the time window is to be selected.
Start Position
This field will actually request Start Time, Start Point Number or Start Frame Number, depending on the setting of the previous field. Either enter the required start position in the appropriate units, or enter the word START which indicates the start of the data file.
End Position
This field will actually request End Time, End Point Number or End Frame Number, depending on the setting of the Window Selection Method field. Either enter the required end position in the appropriate units, or enter the word END which indicates the end of the data file. It is not possible to enter offsets from the end of the file (using END-5 etc.). When this screen is accepted, the processing will begin. As each channel is processed its channel number and description is displayed at the bottom of the screen. Also, when each channel is completed, the statistics of the created .dac file will be displayed. If an output file is already found to exist during processing, then a box will be popped on screen asking whether to overwrite the existing file or not.
Processing begins when all input is entered, then channel-by-channel. If an existing file exists or a channel will be overwritten you will be prompted for overwrite permission. A summary screen is presented after processing is done showing details of the operation.
DAC to RPC Conversion (MDACREM)
This following input is required for this conversion.
 
Option
Description
Input Test Name
The .dac files which are to be combined should all be different channels of the same test. The name of each file should follow the convention below. <test name> <channel number>.dac where the <test name> is the same for all the .dac files. The <channel number> should be at least two characters and is padded with a leading zero if required, i.e. test01.dac would be channel 1 for test name test. The test name for the required set of input .dac files should be entered in this field.
Data Channels
As described in the previous section, the names of the input .dac files should be related by a common test name. Enter in this field the channel numbers of this test that are to be processed. The channel numbers should be entered in the form 1,3-15,21-30 etc., where the hyphen indicates an inclusive range of channel numbers. Alternatively, the word ‘ALL’ may be entered in the field, and the program will locate and process all the .dac files which match the specified test name. Please note that all the .dac files specified for input must have the same sample rate and number of points.
Titles/Units Source
Select the source of the channel titles and units. Header will get them from the input .dac file headers. Extra Details will get any extended titles and units from their extra details areas.
Output File Name
This field specifies the name of the output RPC file to create. This file will be created in the current working directory unless the name is preceded with a directory specification. The name should not include a file extension. If the name of an existing file is specified, then a question box will appear on screen asking whether the existing file should be overwritten or not.
Output File Extension
This field specifies the extension which will be attached to the output file. The default offered is .rsp.
RPC Type
The program can create either RPC II or RPC III files. Select the required file type here. If RPC III is selected, then the last 4 fields on this screen are not offered, since they do not apply to RPC III files.
Test Title
The test title is a textual description of the data in the file. It is stored in the header of the output RPC file.
Report Selection
If this field is set to Yes, then a report file will be generated during processing which contains a list of the channels processed, their descriptions, units and statistics. The report file is a text file which may be printed if required. The program will inform the user of the name of the report file when processing is complete.
Points/Frame
RPC files are organized in ‘groups’. Each group contains 1, 2 or 4 frames, and each frame contains a number of points which is a power of 2 between 256 and 8192. The file must always contain a whole number of groups. Select the number of points per frame from the list offered.
Frames/Group
As described in the previous paragraph, each group within the file must contain either 1, 2 or 4 frames. Select the required number of frames per group from the list.
Window Selection Method
It is not necessary to process the entire length of the input .dac files. A time window can be selected for processing by entering a start and end position.This field controls the method by which the start and end positions are set, which may be Time, measured in seconds from the start of the .dac files, or Point numbers, counted from the start of the .dac files.
Start Position
This field will either request Start Time or Start Point Number, depending on the setting of the previous field. Time is measured in seconds from the start of the data file. Point numbers are counted from the start of the data files. Alternatively, the word ‘START’ may be specified indicating the start of the data file. Please note that the ‘START+’ construct used elsewhere in MSC.Fatigue does not work here.
End Position
This field will either request End Time or End Point Number, depending on the setting of the Window Selection Method field. Times or point numbers are measured from the start of the data files as described above. Alternatively, the word ‘END’ may be specified indicating the end of the data files. Please note that the ‘END+’ construct used elsewhere in MSC.Fatigue does not work here.
RPC II only fields, The fields below appear if RPC II files are being created
Maximum Number of Characters in Channel Description
This field and the following three are only used for RPC II files. These files allow the maximum length of the channel description storage area to be set at the time of file creation. A number between 1 and 80 may be specified.
Maximum Number of Characters in Units Description
RPC II files allow the maximum length of the channel units description storage area to be set at the time of file creation. A number between 1 and 80 may be specified.
Clock Pulses per Second
This field is the clock pulses per second, which may have a value between 1 and 30 000. The sample rate per point of RPC II files is held in the form of a clock speed and a divider. The clock speed, in pulses per second should be entered in this field and the divider (pulses per data point) in the following field. The clock speed divided by the divider value should be equal to the sample rate in points per second. The defaults offered by the program are calculated from the sample rate of the input files, but may be changed if required.
Clock Pulses per Point
As described in the previous paragraph, this field and the clock pulses per second define the sample rate of the RPC file. Enter a number between 1 and 999 in this field.
If the values entered in these two fields are not equivalent to the sample rate of the input files, then a message box will be popped on screen. A choice will be offered of whether to continue or re-select the clock settings.
Incomplete Data Groups
Data in RPC files are stored in groups, each group containing 1 or more frames; only complete groups can be stored. However, sometimes the combination of points and groups, divided by the total number of points in the .dac files, mean that the last group in the RPC file will not be completely filled. In such cases the last group must be padded out with a series of values, or discarded.
If the last group is incomplete the Incomplete Data Group window is shown.
The padding options are:
Zero - All extra values are set to zero
Last - All extra values are set to whatever is the last value in that channel
Mean - All extra values are set to the mean value of that channel
Truncate to last full group, i.e. discard the unfilled group
Linear Ramp from last to start value
Haversine join (a cosine wave form) from last to start value
When all the parameters have been set and accepted, processing will begin.
As each channel is processed, the program will display its description, units, and the statistics of that channel. If the report file option was set to Yes, then a report of the processing will be generated. If the MSC.Fatigue notebook system is active, then this report is written to the notebook file, otherwise the report is written to a file which has the same name as the output RPC file but an extension of .lst. A message will be displayed when processing is complete describing where the report has been written.
Extra Details
The .dac files only allow 24 characters for channel descriptions and 28 characters for the channel units as stored in the header. RPC files may have more characters than this for both description and units. The description and units written into the .dac file header is a truncated form of the RPC file description and units. However, the full description and units are written into the extra details area of the .dac files under the keywords $YTITLE and $YUNIT.
In addition, the test title as stored in the header of the RPC file is written into the extra details area under the keyword $RPTITLE.
Batch Mode Operation
A sample batch line is given below:
mdacrem /inp=test/out=result/win=p/fill=m/ov=y/cho=c/fra=256
This will use test as the generic input (test101, test102, etc.) with ALL channels being processed by default. The file name results is the output file name (results.rsp and results.lst). The window selection is points (/win=p) and the frame size 256 points.
If the combination of points per group and the total number of points to be processed result in the last group being incomplete then a fill value must be supplied (/fill=m in this example). In the event of anomalies such as incomplete groups, MDACREM must be told to continue despite the incomplete group by the /cho=c command; otherwise it would abort the batch run.
A list of MREMDAC’s batch keywords:
 
INPut
Input RPC file name. /INP=test
CHAnnels
Channel Numbers. /CHA=all
OUTput
Output File root name. /OUT=test
EXTension
Output file extension. /EXT=DAC
REPort
Report Selection, yes (Y) or no (N). /REP=Y
WINdow
Window Selection Method T=time, P=Points, F=Frame. /WIN=P
STArt
Start Position. /STA=10
END
End Position. /END=30
OVerwrite
Overwrite Output Files Y=yes, N=no, A=all, E=end. /OV=A
A list of MDACREM’s batch keywords:
 
INPut
Input (DAC) Root File Name, /INP=test
CHAnnels
Channel Numbers, /CHA=1-10
OUTput
Output RPC File Name, /OUT=test
CHOice
Whether to proceed if channels not contiguous, /CHO=Y
EXTension
Output File Extension, /EXT=RSP
REPort
Report Selection, /REP=Y
FRAme
Frame Size, /FRA=512
GRP
Frames per Group, /GRP=2
TITle
Test Title, /TIT=Test title
WINdow
Window Selection Method, /WIN=P
STArt
Start Position, /STA=10
END
End Position, /END=20
OVerwrite
Overwrite Output File, /OV=Y
TYPe
RPC File Type, /TYP=3
CD
Maximum Length of Channel Description, /CD=40
EU
Maximum Length of Channel Units, /EU=40
PULSEC
Pulses per Second, /PULSEC=10000
PULPNT
Pulses per Point, /PULPNT=16
SCAL
Scale Factors, /SCAL=O
FILL
Fill value for missing points, Z, L, or M, /FILL=M
Regenerate Time Histories from PSDs
To regenerate a time signal from the frequency domain ideally we would perform an 'Inverse Fourier Transformation' on the complex vector of frequency domain results. This would yield exactly the same time history as we started with. However when starting with a PSD this method is inappropriate because the PSD does not contain any of the original phase information. For certain time histories, however, we are able to make assumptions about the original phase content and therefore regenerate a statistically equivalent time history. The assumption we make is that the time history is taken from an ergodic stationary Gaussian random process.
The method used by MREGEN to generate a time signal is as follows:
1. Generate a white noise signal of a sample rate and length proposed by the user. White noise is a random signal with equal amplitudes at all frequencies up to the Nyquist frequency (half the sample rate). The minimum sample rate allowed is twice the maximum frequency in the PSD file. There is also a minimum signal length, which is related to the FFT buffer size.
2. Create a "gain" file based on the PSD input. If the PSD input is in XY format, or if the specified sample rate or buffer size is different from the suggested default, some interpolation will be required between the points of the PSD, and the square root of the interpolated file is taken to produce a gain file. Interpolation can be linear or logarithmic.
3. The gain file is then used in a Fast Fourier Filtering operation applied to the white noise signal.
4. Finally, the amplitude of the filtered signal is adjusted to ensure its RMS matches the area under the PSD, and any required mean offset is added.
The output of this process will be a signal whose PSD approximately matches that of the input PSD. Since the signal is based on a sample of white noise, and since the PSD represents an average over time, longer time signals will provide a closer match to the original signal.
Caution:  
Since an "inverse fourier transform" is not being performed, a limitation exists in algorithm defined above. If your input PSD file (and hence the gain file) includes a sharp edge, slight discontinuities will be produced at the end of each buffer. This is due to the sharp "edge" in the time domain translating to a "ringing" in the time domain. If the input PSD is a very sharp spike, defined by only one or two points, the effect can be more serious.
Module Operation
The module can be operated by typing, MREGEN, at the system prompt or by invoking it from the File Conversion Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
There are 2 main steps to operating MREGEN - Signal Regeneration Menu.
1. Select the PSD Option from the MREGEN - Signal Regeneration Menu.
2. Tell the the type and name of the file that is to be converted, and input values for other options in the MREGEN - Signal Reconstruction form shown below:
 
MREGEN_ PSD Reconstruction Form Entries
This following input is required for the regeneration.
 
Option
Description
Input Type
Inputs can be an nCode format PSD file (e.g. generated by MASD) or binary or ASCII xy file. The ASCII file needs two columns of data, representing frequency (in Hz) and PSD value, and the units should be defined. The first point MUST be at zero frequency. An example file follows (lines preceeded by # are optional):
# ASCII X-Y PSD file
# Lines preceded by # are comments
# Data is XY points - Frequency, PSD
UNITS=MPa^2/Hz # for example
0, 0
5, 1
6, 10
10, 10
12, 2
14, 0
16, 4
17, 2
20, 0
Input Filename
Input or select the filename to be processed. Default filename extensions are .PSD, .MDF, and .ASC for the three file types.
Output Filename
Enter the name of the time series file to be created. If this file exists, the program will ask whether the file may be overwritten. The default extension for this file is .dac
Signal Duration
Enter here the signal duration (in seconds). The default signal length is the minimum recommended, based on an assumed FFT buffer size. Bear in mind that what is generated by this module is a random sample representing a stationary random process. The longer the sample, the better the representation of the process.
Sample Rate
The sample rate of the generated signal must be at least twice the maximum frequency in the PSD (the default). This is necessary to avoid aliasing. If the signal is to be used for fatigue analysis, a frequency of at least 10 times the maximum frequency of interest in the PSD is recommended.
Buffer Size
This is the size of the FFT buffer used in the filtering operation, and controls the resolution of the filtering operation.
Signal Mean
Enter the desired mean of the output signal.
Units
Enter the units of the output signal.
Label
Enter the Y-axis label for the output signal.
Interpolation Method
Select the interpolation method where appropriate.
Cross-Platform Conversion - (MCONFIL)
MCONFIL is a MSC.Fatigue utility module that converts a wide range of data files between a variety of hardware platforms and operating systems. MCONFIL converts files so that they can be processed on hardware platforms and operating systems other than that on which the file was originally created. MCONFIL is capable of changing the format of binary files so that such files can be used on any of the range of machines supported by MSC.Fatigue.
A typical usage situation might be one whereby data is collected in the field with a PC running MS-DOS, but is to be analyzed on a workstation running UNIX. MCONFIL can convert the MS-DOS file to a format usable by the UNIX machine (or the other way around if necessary).
Another scenario is where the conversion may need to be carried out on a VAX so that the data files can be written to standard 6250 bpi computer tapes. MCONFIL supports binary conversions of this kind where the computer on which the conversion is carried out is different from either the source or target computer. MCONFIL can process the following file types:
 
File Type
Typical File Extension
Demultiplexed Data
DAC,KSN, PSD
Time History Database
TDB
Materials Database
MDB
The above file types could have been produced on any of the following hardware platforms/operating systems:
 
RSX11M
(for the DEC PDP range of minicomputers)
MS-DOS
(for DEC VAX computers)
UNIX
(for the IBM PC and compatibles)
UNIX
(Masscomp workstations)
UNIX
(Apollo workstations)
UNIX
(Hewlett Packard)
UNIX
(Sun)
UNIX
(SGI)
UNIX
(IBM 6000)
UNIX
(DECstation)
The files may be converted to be usable on any of the same hardware platforms/operating systems.
Module Operation
The module can be operated by typing, MCONFIL, at the system prompt or by invoking it from the File Conversion Utilities pulldown menu under Tools | MSC.Fatigue (for Patran) or under Tools | Fatigue Utilities (for Pre & Post).
There are 3 basic steps to operating MCONFIL:
1. Tell MCONFIL the name and the type of file that is to be converted (i.e., name the input file).
2. Tell MCONFIL the hardware platform/operating system the input file was created on.
3. Tell MCONFIL on which hardware platform/operating system that the output file will be configured to run under.
There are other details that MCONFIL needs to know, such as the name of the output file and whether or not existing files can be overwritten, etc.
 
Important:  
Converting (and overwriting) an already converted .dac file is possible. For example, a user may convert from afile.dac for DOS to afile.dac for UNIX, and then, if they forget that the conversion has already been done, inadvertently attempt to convert the UNIX version to UNIX. This release of CONFIL will not prevent the user from corrupting files in such fashion. It is up to the user to keep track of file names and file types.
These are the steps that must be followed when operating MCONFIL in interactive (nonbatch) mode.
Naming the Input File (Screen 1)
When MCONFIL is first invoked a screen appears. It is here where the input file to be converted is identified. It is necessary to type the full file name and its file extension. Only those file types named previously can be processed. Input file names may be specified with wildcards (an asterisk “*”).
When the file name has been input, the user should confirm the choice by pressing OK, F1 or ENTER. This will cause the next screen to be displayed.
When the input file has been named, the user is prompted to supply the output file name. By default, the output file name is the same as the input file. If the same name and directory are specified then MCONFIL will prompt for permission to overwrite the input file. If the input file is to be preserved then the user should select another name or directory for the output file.
From which File Format to what File Format (Screen 2)
The second is screen where the user tells MCONFIL the hardware platform/operating system the input file was created on, and which hardware platform/operating system that the output file will be configured to run under.
The numbers at the side of each option are the MSC.Fatigue designation codes for that option. These numbers are used when operating MCONFIL in batch mode.
To specify format from and format to, a selection must be made from at least two of the three menus. The first menu’s (left of the screen) choice was effectively made when the file extension was specified on the previous screen, although it can be changed here. The second menu (middle) is the menu upon which the user must specify the operating system that the input file was created under. This is the file source operating system.
The third menu (right of the screen) is the menu upon which the user must specify the operating system that the output file will be created to run under. This is the file destination operating system.
The easiest way of selecting the source and destination operating systems is to point and click the mouse pointer. So if the user wishes to select MSDOS as the source and VMS as the destination, they need only to click on MSDOS and VMS in the appropriate menu.
When using the keyboard, the left/right arrow keys move the highlight bar between the menu boxes.
The up/down arrow keys move the highlight bar up and down within menus.
Pressing ENTER selects an option within a menu.
When all selections have been made, clicking OK or F1 causes MCONFIL to start the conversion. MCONFIL tells the user about the progress of the conversion with an on-screen % converted meter.
If no selection has been made from a menu then MCONFIL will take the current or last position of the highlight cursor as the selection.
When conversion is complete, MCONFIL offers the user the chance to perform another conversion.
Batch Operation
Batch operation has the following batch keywords:
 
/INPut
The name of the file to be converted (/INP=FILENAME.EXT)
/OUTput
The name of the post conversion output file (/OUT=NEWNAME.EXT)
/TYPe
Select the type of file to be converted. Files can be one of the following: .plt, .dif, .mux. Standard single channel data files: .dac, .acf, ada, .asd, ccf, coh, csd, .gai, .pha, .pvx,.sxx, .syy, .sxy, .ksn (all type 11 files) (/TYPE=11 (the numbers correspond to those on the menu)) Note that this is actually a character string and not a number, so if the pure number does not appear to be working, try typing in the entire string as it appears in the interactive window of MCONFIL, e.g. 7-TDB.)
/SOUrce
Select the source operating system: DEC RSX11M, DEC VAX, MS-DOS, UNIX (APOLLO, SUN, HP, MASSCOMP, SGI, IBM, DEC).(/SOU=3 (the numbers correspond to those on the menu))
/DEStination
Select the source operating system: DEC RSX11M, DEC VAX, MS-DOS, UNIX (APOLLO, SUN, HP, MASSCOMP, SGI, IBM, DEC).(/DES=3 (the numbers correspond to those on the menu))
/OVerwrite
Is used in both generic and individual cases. If the output file(s) exist, then you can choose to overwrite them with this keyword. (/OV=Y)
/AGN
Convert another file - Yes or No, the default is No to prevent MCONFIL looping. (/AGN=Y or N)
Example:
mconfil	 /inp=saetrn/out=saetrn/type=11/sou=2 /des=7/ov=yes/agn=n
This batch line would convert saetrn.dac which is a type 11 file (demultiplexed data) from a VAX (/SOU=2) compatible operating system to a Sun (/DES=7) operating system and give it the same name, overwriting the existing file. The program would then quit and not perform another conversion (/AGN=N).
.
Important:  
The choices that appear in the /TYPe keyword and subsequently on the CONFIL interactive window are dependent on a configuration file called confil.sys found in the nssys directory of the MSC.Fatigue system. It can be altered to include or exclude different supported file types. All file types that are used by MSC.Fatigue are included so this should not be necessary.
Waterfall File Create - (MWFLCRE)
Module MWFLCRE has four functions. These are:
Combine single parameter files into three parameter waterfall (.WFL) files
Split .WFL files into multiple single parameter files
Convert a .WFL file into a .SAN histogram file
Convert a .SAN histogram file into a .WFL file
The above functions can, for example, enable the data contained in .WFL files to be operated by analysis modules that cannot normally operate on waterfall data, but which can operate on single parameter files.
1. Combining single parameter files into 3 parameter waterfall (.WFL) files - Waterfall file creation.
This part of the program combines 2 or more spectral density files in a .WFL file. The spectral density files are single parameter and typically have an extension of .PSD, .ASD, .DAC, or .AMP. They can be made by programs such as ASD.
2. Splitting .WFL files into multiple single parameter files.
This function generates output files from an input waterfall file. The spectra at a single speed can be stripped out of a waterfall file but more probably a series of spectra can be stripped out into a series of 1 parameter files. The generic name of the output files is specified by the user but they will normally take their name from the input file with numbers appended to them.
The number of .ASD files created will depend upon the Z-axis range specified by the user multiplied by the incremental spacing within that range. For example if the Z-axis speed specified is from 0 to 50 , in increments of 1, then 50 ASD files will be created. If the increment is 0.1 then 500 ASD files will be created (50 / 0.1). If the increment is 10 then only 5 ASD files will be created.
It is up to the user to decide how many 1 parameter files are to be created, although even if the entire input .WFL file were split, the sum total of the output files will usually only be about 25% larger then the original waterfall file size.
3. Converting a .WFL file into a .SAN histogram file.
This option converts the input file into a single .SAN histogram file. The .SAN file can be manipulated as a standard histogram file, but not plotted using P3D.
4. Converting a .SAN file into a .WFL file.
This option converts the input file into a single .WFL file.
Option 1: Create .WFL from individual files
This option merges a range of single parameter files into a waterfall file. The filename definition screen contains the following fields.
 
Option
Description
Input Filename Extension
As mentioned, the single parameter input files typically have an .ASD extension. However if the files to be merged have a different extension, such as .DAC, then the extension should be entered in this field.
Output Filename
This is the name of the output .WFL file. It will be the sum of all the input files.
Input Filename(s)
Here is where the input files are named. Their names can be entered in full, or a generic name can be entered. For example ORD1P3(1-20) will input ORD1P301, ORD1P302, ORD1P303...to ORD1P320, i.e. 20 files.
A maximum of 128 input files can be specified. A minimum of 2 files must be specified.
The final screen of waterfall construction enables the user to label the axes of the output waterfall file. The defaults for the frequency and Z axes are read from the header area of the 1st input file, although they can be edited. When this screen has been accepted MWFLCRE will process the input files, create the output file, and return to the Main Menu.
Option 2: Split .WFL to .ASD files
This option is the opposite to create .WFL form .ASD. When selected the following screen will appear. The field must be completed as follows.
 
Option
Description
Input filename
This is where the input file is named. It has to be a waterfall file format, although if its file extension is not .WFL, but its format is that of a waterfall file then it can be processed. The full file name (including extension) only has to be entered if the extension is not .WFL.
Output filename
This is where the generic name for all the output files is entered. Note that the final filename cannot be more than 8 characters long, so entering TESTFIL as a generic name and generating more than 9 files will produce an error message because TESTFIL10 contains too many characters.
Output extension
Any extension can be specified here, although .PSD is the default extension.
Split from/to
Whatever is the range of values and increments along the Z-axis, a subset of those values can be entered in these fields.
These 2 fields allow the input file to be split selectively, i.e. not all the Z-axis values have to be processed (every Z-axis value will produce and output file).
Only numbers are allowed (not START, or END etc.).
The exact number of output files created is dependent upon the range and its incremental spacing. See Technical Overview above (split WFL files into multiple 1 parameter files) for a full explanation.
When the above fields have been filled and accepted MWFLCRE returns to the Main Menu.
Option 3: Convert .WFL file to .SAN file
The only input that the user has to make is to name the input waterfall file and its corresponding
output file.
Option 4: Convert .SAN to .WFL file
The only input that the user has to make is to name the input waterfall file and its corresponding
output file.
Batch Operation
A list of MWFLCRE’s batch keywords:
 
/EXTension
The file extension
/OUTput
The output file name
/OVerwrite
Whether to overwrite an existing output file
/INPut
The input file names
/SPEed
The speed values
/SMINimum
Minimum speed to fitS
/MAXimum
Maximum speed to fit
/FLABel
The frequency labe
/lFUNIts
The frequency units
/SLABel
The speed label
/SUNIts
The speed units
/ZLABel
The Z data labe
/lZUNIits
The Z data units