*********************************************
*
*  LTSpice Models for Experiment #1
*  ECE 482, Spring 2016
*
*********************************************

Note that placeholder values have been given for all parameters.  These should not be considered to be correct.

Included files:

Battery:
  ModelD.asc - Internal Schematic of "Model D" battery model, as discussed in class
  ModelD.asy - Symbol to allow Model D to be used as a subcircuit
  ModelD_example - example file that uses a Model D subcircuit with a pulsed load, as shown in class

  ModelD.asc is the batteyr model you will use in this experiment.  You might wish to begin editing from ModelD_example.asc.  

  Usage: The symbol for Model D has the following editable parameters
    Cnom - Nominal capacity of battery, in Amp-hours (already scaled by 3600 internally)
    VSOC0 - Initial battery capacity, between 0 (fully discharged) and one (fully charged)
    Vh - Hystersis amplitude, in volts
    Th - Hystersis time constant, in seconds
    R1 - Diffusion resistance, in Ohms
    C1 - Diffusion capacitance, in Farads
    Rop - Discharge path resistance, in Ohms
    Ron - Charge path resistance, in Ohms

  Also, in the file Model D.asc, you will find the definition of the voltage-vs-SOC curve.  At the bottom, the line

  .func VsocTable(x)= {table(x,0,3.0021,    0.01 ,   3.108,   0.02 ,   3.191, ...

  has format

  .func VsocTable(x)= {table(x,SOC0, V(SOC0), SOC1, V(SOC1), SOC2, V(SOC2),  ...

  the datapoints making up the voltage-vs-SOC curve can be entered here, as pairs.  Use as many datapoints as
  necessary to obtain the main characteristics of the curve.

Motor:
  Motor_Dq.asc - (internal) Model of motor behavior in DQ reference frame.  Used in Motor_NoLoad.asc
  Motor_DQ.asy - (internal) Symbol for above
  Motor_NoLoad.asc - Internal schematic of PM motor model, as discussed in class
  Motor_NoLoaf.asy Symbol for above
  transforms.sub - (internal) netlist library for refrence frame transformations.  Used in Motor_NoLoad.asc
  transforms.asy - (internal) Symbol for above
  Motor_example.asc - example file that uses PM motor model.

  Motor_NoLoad is the motor model you will use in this experiment.  You might wish to begin editing from Motor_example.asc.
  Motor_NoLoad has the following pins:
    wrm - input; rotational speed in rad/sec
    theta_m - output; current mechanical angle of rotation
    va - output; voltage on winding a
    vb - output; voltage on winding b
    vc - output; voltage on winding c

  Usage: The symbol for Motor_NoLoad has the following editable parameters
    Rw - winding resistance, in Ohms
    Lw - Linding inductance, in Ohms
    lambda_w - Flux linkage, in Volts*sec/radian
    P - Number of poles

  The details of Motor_DQ and transforms files are not critical to understand for this course.  However, they are provided 
  unencrypted.
  