C  SAMPLE1Z.AFT                                       Ausust 31, 1996
C
C        This is a sample file to illustrate the KIZILCAY F-DEPENDENT usage of
C    ARMAFIT.  "*.AFT" means an input file to ARMAFIT.  This example fits the
C    frequency characteristic of the input admittance of an LCR series circuit
C    to an ARMA (z-transform) model, and generates the punch-out file which
C    can be used as KIZILCAY F-DEPENDENT branch cards.  Subsequent transient
C    calculation is illustrated in "SAMPLE1Z.DAT", which is presented in ref.
C    [1] in the help option screen of ARMAFIT.
C
C        The frequency response of the LCR series circuit is measured
C    experimentally, and the values are approximately R = 100 [ohm], L = 50
C    [mH] with loss 65 [ohm], and C = 4800 [pF].  For further information,
C    consult ref. [1] in the help option screen of ARMAFIT.
C
C        To execute ARMAFIT, type as : "ARMAFIT SAMPLE1Z.AFT".  ARMAFIT reads
C    this file, and generates files "TEMP.PCH" and "TEMP.AGF".  The former is
C    the punch-out file used as KIZILCAY F-DEPENDENT branch cards, and the
C    latter is a file containing the fitting result.  The fitting result may
C    be confirmed by typing "G", invoking a batch file "G.BAT" to convert
C    "TEMP.AGF" to "TEMP.PG" and to execute a small plotting program "PGVGA"
C    (VGA version of ProGrapher 3.4).  "TEMP.PG" is the input to "PGVGA".
C    To replot the fitting results, using "R.BAT" is preferred to bypass the
C    conversion.  To fullfil this procedure, the following files are required:
C        ARMAFIT.EXE :  fitter
C        AGF2PG.EXE  :  data converter (from *.AGF to *.PG)
C        PGVGA.EXE   :  vector-plotting program
C        G.BAT       :  batch file for plotting
C        R.BAT       :  batch file for replotting
C    If a user wishes to specify another name for "TEMP.PCH" and for
C    "TEMP.AGF", then invoke ARMAFIT in the help mode as : "ARMAFIT -?".  In
C    this case, the data conversion should be done by the user, by typing
C    "AGF2PG ???.AGF > ???.PG", where "???" is the specified file name.
C
C        All rights are reseved by Taku Noda, Taku's Software Archive.
C
KIZILCAY F-DEPENDENT  { keyword for the KIZILCAY F-DEPENDENT use
C -- fitting parameters -------------------------------------------------------
  Z      { 'S': Laplace s-rational model, 'Z': z-rational (ARMA) model     (*1)
   1.E-6 { time step                                                       (*2)
   1   6 { min and max orders                                              (*3)
  3.   5 { permitted error in %, and max number of iterarion               (*4)
  21  1. { number of frequencies, and pre-defined gain                     (*5)
C
C    A line starts with 'C' is considered as a comment line, and a curly
C    bracket '{' designates the point a comment starts.
C
C    (*1) Lower case letters 's' and 'z' are also accepted.  If 'S' is chosen,
C         then parameters specified at (*2) are different.
C    (*2) Time step should be specified, when fitted in case of an ARMA model.
C    (*3) Fitting is performed by increasing the model order from the min
C         order to the max order specified here to find a best fit.  The best
C         fit is automatically found based on a logic of Standard Deviation:
C         SD and Akaike's Information Criterion: AIC.
C    (*4) ARMAFIT stops increasing the model order, when SD becomes smaller
C         than the permitted error specified here.  ARMAFIT uses the
C         linearized least-squares (LS) method proposed in refs. [1] and [2]
C         of the help screen.  Although the linearized LS usually gives a good
C         accuracy, further improvement of the accuracy may be achieved using
C         the Newton Raphson iteration.  But the Newton-Raphson method
C         sometimes does not converge, and it is recommended to set the max
C         number of iteretion to zero to bypass the iteretion.  After finding
C         a good model, then it is worth trying to set it to a small number.
C    (*5) Pre-defined gain is a factor which is multiplied to the following
C         amplitude data.
C
C -- frequency response -------------------------------------------------------
    1.0E3  3.08E-5   88.2  { frequency [Hz], amplitude [mho], phase angle [deg]
    2.0E3  6.32E-5   87.8
    3.0E3  1.00E-4   88.6
    5.0E3  1.97E-4   90.0
    7.0E3  4.11E-4   84.2
    8.0E3  6.34E-4   84.1
    8.5E3  8.65E-4   78.6
    9.0E3  1.28E-3   73.9
    9.5E3  2.41E-3   61.9
   10.0E3  4.98E-3  -2.52
   10.5E3  2.69E-3  -57.1
   11.0E3  1.63E-3  -70.9
   12.0E3  8.34E-4  -79.9
   13.0E3  5.85E-4  -84.2
   15.0E3  3.67E-4  -85.9
   17.0E3  2.74E-4  -88.1
   20.0E3  2.01E-4  -87.1
   30.0E3  1.12E-4  -89.1
   50.0E3  5.99E-5  -89.6
   70.0E3  3.91E-5  -89.2
  100.0E3  2.35E-5  -89.6
C -----------------------------------------------------------------------------
