org.jscience.engineering.control
Class BlackBox

java.lang.Object
  extended by org.jscience.engineering.control.BlackBox
Direct Known Subclasses:
AtoD, ClosedLoop, Compensator, DelayLine, DtoA, FirstOrder, HighPassPassive, LowPassPassive, OpenLoop, Prop, PropDeriv, PropInt, PropIntDeriv, SecondOrder, ZeroOrderHold

public class BlackBox
extends java.lang.Object

DOCUMENT ME!


Field Summary
protected  double deadTime
          DOCUMENT ME!
protected  double deltaT
          DOCUMENT ME!
protected  java.lang.String fixedName
          DOCUMENT ME!
protected  double forgetFactor
          DOCUMENT ME!
protected  Complex inputS
          DOCUMENT ME!
protected  double[] inputT
          DOCUMENT ME!
protected  int integMethod
          DOCUMENT ME!
protected  double integrationSum
          DOCUMENT ME!
protected  boolean maptozero
          DOCUMENT ME!
protected  java.lang.String name
          DOCUMENT ME!
protected  int nPlotPoints
          DOCUMENT ME!
protected  int orderPade
          DOCUMENT ME!
protected  Complex outputS
          DOCUMENT ME!
protected  double[] outputT
          DOCUMENT ME!
protected  boolean padeAdded
          DOCUMENT ME!
protected  double sampFreq
          DOCUMENT ME!
protected  int sampLen
          DOCUMENT ME!
protected  ComplexPolynomial sDenom
          DOCUMENT ME!
protected  int sDenomDeg
          DOCUMENT ME!
protected  int sDenomDegPade
          DOCUMENT ME!
protected  ComplexPolynomial sDenomPade
          DOCUMENT ME!
protected  ComplexPolynomial sNumer
          DOCUMENT ME!
protected  int sNumerDeg
          DOCUMENT ME!
protected  int sNumerDegPade
          DOCUMENT ME!
protected  ComplexPolynomial sNumerPade
          DOCUMENT ME!
protected  Complex[] sPoles
          DOCUMENT ME!
protected  Complex[] sPolesPade
          DOCUMENT ME!
protected  Complex sValue
          DOCUMENT ME!
protected  Complex[] sZeros
          DOCUMENT ME!
protected  Complex[] sZerosPade
          DOCUMENT ME!
protected  double[] time
          DOCUMENT ME!
protected  ComplexPolynomial zDenom
          DOCUMENT ME!
protected  int zDenomDeg
          DOCUMENT ME!
protected  ComplexPolynomial zNumer
          DOCUMENT ME!
protected  int zNumerDeg
          DOCUMENT ME!
protected  Complex[] zPoles
          DOCUMENT ME!
protected  int ztransMethod
          DOCUMENT ME!
protected  Complex zValue
          DOCUMENT ME!
protected  Complex[] zZeros
          DOCUMENT ME!
 
Constructor Summary
BlackBox()
           
 
Method Summary
protected  void addDeadTimeExtras()
           
protected  void calcPolesZerosS()
           
protected  boolean deadTimeWarning(java.lang.String method)
           
 double evalMagTransFunctS()
           
 double evalMagTransFunctS(Complex sValue)
           
 double evalMagTransFunctS(double freq)
           
 double evalMagTransFunctZ()
           
 double evalMagTransFunctZ(Complex zValue)
           
 double evalPhaseTransFunctS()
           
 double evalPhaseTransFunctS(Complex sValue)
           
 double evalPhaseTransFunctS(double freq)
           
 double evalPhaseTransFunctZ()
           
 double evalPhaseTransFunctZ(Complex zValue)
           
 Complex evalTransFunctS()
           
 Complex evalTransFunctS(Complex sValue)
           
 Complex evalTransFunctS(double freq)
           
 Complex evalTransFunctZ()
           
 Complex evalTransFunctZ(Complex zValue)
           
 double getCurrentInputT()
           
 double getCurrentOutputT()
           
 double getCurrentOutputT(double ttime, double inp)
           
 double getCurrentTime()
           
 double getDeadTime()
           
 double getDeltaT()
           
 double getForgetFactor()
           
 Complex getInputS()
           
 double[] getInputT()
           
 int getIntegMethod()
           
 boolean getMaptozero()
           
 java.lang.String getName()
           
 int getNplotPoints()
           
 Complex getOutputS()
           
 Complex getOutputS(Complex svalue, Complex inputs)
           
 double[] getOutputT()
           
 int getPadeOrder()
           
 Complex[] getPolesS()
           
 Complex[] getPolesZ()
           
 Complex getS()
           
 double getSampFreq()
           
 int getSampleLength()
           
 ComplexPolynomial getSdenom()
           
 int getSdenomDeg()
           
 ComplexPolynomial getSnumer()
           
 int getSnumerDeg()
           
 double[] getTime()
           
 Complex getZ()
           
 ComplexPolynomial getZdenom()
           
 int getZdenomDeg()
           
 Complex[] getZerosS()
           
 Complex[] getZerosZ()
           
 ComplexPolynomial getZnumer()
           
 int getZnumerDeg()
           
 int getZtransformMethod()
           
 void impulseInput(double finalTime)
           
 void impulseInput(double impulseMag, double finalTime)
           
static Complex[][] inverseTransform(ComplexPolynomial numer, ComplexPolynomial denom)
           
 void mapstozAdHoc()
           
 void mapstozAdHoc(double deltaT)
           
 int orderPade()
           
protected  void pade()
           
 void plotBode(double lowFreq, double highFreq)
           
 void plotPoleZeroS()
           
 void plotPoleZeroZ()
           
 void rampInput(double finalTime)
           
 void rampInput(double rampGradient, double finalTime)
           
 void rampInput(double rampGradient, int rampOrder, double finalTime)
           
 void rampInput(int rampOrder, double finalTime)
           
 void resetZero()
           
 void setDeadTime(double deadtime)
           
 void setDeadTime(double deadtime, int orderPade)
           
 void setDeltaT(double deltaT)
           
 void setForgetFactor(double forget)
           
 void setInputS(Complex input)
           
 void setInputT(double ttime, double inputt)
           
 void setIntegrateOption(int integMethod)
           
 void setIntegrateOption(java.lang.String integMethodS)
           
 void setMaptozero(boolean maptozero)
           
 void setName(java.lang.String name)
           
 void setNplotPoints(int nPoints)
           
 void setPadeOrder(int orderPade)
           
 void setS(Complex s)
           
 void setS(double si)
           
 void setS(double sr, double si)
           
 void setSampFreq(double sfreq)
           
 void setSampleLength(int samplen)
           
 void setSdenom(Complex[] coeff)
           
 void setSdenom(ComplexPolynomial coeff)
           
 void setSdenom(double[] coeff)
           
 void setSnumer(Complex[] coeff)
           
 void setSnumer(ComplexPolynomial coeff)
           
 void setSnumer(double[] coeff)
           
 void setZ(Complex z)
           
 void setZ(double zr, double zi)
           
 void setZdenom(Complex[] coeff)
           
 void setZdenom(ComplexPolynomial coeff)
           
 void setZdenom(double[] coeff)
           
 void setZnumer(Complex[] coeff)
           
 void setZnumer(ComplexPolynomial coeff)
           
 void setZnumer(double[] coeff)
           
 void setZtransformMethod(int ztransMethod)
           
 void stepInput(double finalTime)
           
 void stepInput(double stepMag, double finalTime)
           
static Complex timeTerm(double ttime, Complex coeff, Complex constant, Complex power)
           
protected  void transferPolesZeros()
           
static void transientResponse(int nPoints, double finalTime, double deadTime, ComplexPolynomial numerT, ComplexPolynomial denomT, java.lang.String graphtitle1, java.lang.String graphtitle2)
           
protected  void zeroPoleCancellation()
           
 void zTransform()
           
 void zTransform(double deltat)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sampLen

protected int sampLen
DOCUMENT ME!


inputT

protected double[] inputT
DOCUMENT ME!


outputT

protected double[] outputT
DOCUMENT ME!


time

protected double[] time
DOCUMENT ME!


forgetFactor

protected double forgetFactor
DOCUMENT ME!


deltaT

protected double deltaT
DOCUMENT ME!


sampFreq

protected double sampFreq
DOCUMENT ME!


inputS

protected Complex inputS
DOCUMENT ME!


outputS

protected Complex outputS
DOCUMENT ME!


sValue

protected Complex sValue
DOCUMENT ME!


zValue

protected Complex zValue
DOCUMENT ME!


sNumer

protected ComplexPolynomial sNumer
DOCUMENT ME!


sDenom

protected ComplexPolynomial sDenom
DOCUMENT ME!


zNumer

protected ComplexPolynomial zNumer
DOCUMENT ME!


zDenom

protected ComplexPolynomial zDenom
DOCUMENT ME!


sPoles

protected Complex[] sPoles
DOCUMENT ME!


sZeros

protected Complex[] sZeros
DOCUMENT ME!


zPoles

protected Complex[] zPoles
DOCUMENT ME!


zZeros

protected Complex[] zZeros
DOCUMENT ME!


sNumerDeg

protected int sNumerDeg
DOCUMENT ME!


sDenomDeg

protected int sDenomDeg
DOCUMENT ME!


zNumerDeg

protected int zNumerDeg
DOCUMENT ME!


zDenomDeg

protected int zDenomDeg
DOCUMENT ME!


deadTime

protected double deadTime
DOCUMENT ME!


orderPade

protected int orderPade
DOCUMENT ME!


sNumerPade

protected ComplexPolynomial sNumerPade
DOCUMENT ME!


sDenomPade

protected ComplexPolynomial sDenomPade
DOCUMENT ME!


sPolesPade

protected Complex[] sPolesPade
DOCUMENT ME!


sZerosPade

protected Complex[] sZerosPade
DOCUMENT ME!


sNumerDegPade

protected int sNumerDegPade
DOCUMENT ME!


sDenomDegPade

protected int sDenomDegPade
DOCUMENT ME!


maptozero

protected boolean maptozero
DOCUMENT ME!


padeAdded

protected boolean padeAdded
DOCUMENT ME!


integrationSum

protected double integrationSum
DOCUMENT ME!


integMethod

protected int integMethod
DOCUMENT ME!


ztransMethod

protected int ztransMethod
DOCUMENT ME!


name

protected java.lang.String name
DOCUMENT ME!


fixedName

protected java.lang.String fixedName
DOCUMENT ME!


nPlotPoints

protected int nPlotPoints
DOCUMENT ME!

Constructor Detail

BlackBox

public BlackBox()
Method Detail

setSnumer

public void setSnumer(double[] coeff)

addDeadTimeExtras

protected void addDeadTimeExtras()

setSnumer

public void setSnumer(Complex[] coeff)

setSnumer

public void setSnumer(ComplexPolynomial coeff)

setSdenom

public void setSdenom(double[] coeff)

setSdenom

public void setSdenom(Complex[] coeff)

setSdenom

public void setSdenom(ComplexPolynomial coeff)

setDeadTime

public void setDeadTime(double deadtime)

setDeadTime

public void setDeadTime(double deadtime,
                        int orderPade)

setPadeOrder

public void setPadeOrder(int orderPade)

getDeadTime

public double getDeadTime()

getPadeOrder

public int getPadeOrder()

pade

protected void pade()

transferPolesZeros

protected void transferPolesZeros()

orderPade

public int orderPade()

deadTimeWarning

protected boolean deadTimeWarning(java.lang.String method)

zTransform

public void zTransform(double deltat)

zTransform

public void zTransform()

mapstozAdHoc

public void mapstozAdHoc(double deltaT)

mapstozAdHoc

public void mapstozAdHoc()

setMaptozero

public void setMaptozero(boolean maptozero)

setZnumer

public void setZnumer(double[] coeff)

setZnumer

public void setZnumer(Complex[] coeff)

setZnumer

public void setZnumer(ComplexPolynomial coeff)

setZdenom

public void setZdenom(double[] coeff)

setZdenom

public void setZdenom(Complex[] coeff)

setZdenom

public void setZdenom(ComplexPolynomial coeff)

setDeltaT

public void setDeltaT(double deltaT)

setForgetFactor

public void setForgetFactor(double forget)

setSampFreq

public void setSampFreq(double sfreq)

setS

public void setS(Complex s)

setS

public void setS(double sr,
                 double si)

setS

public void setS(double si)

setZ

public void setZ(Complex z)

setZ

public void setZ(double zr,
                 double zi)

setZtransformMethod

public void setZtransformMethod(int ztransMethod)

setIntegrateOption

public void setIntegrateOption(int integMethod)

setIntegrateOption

public void setIntegrateOption(java.lang.String integMethodS)

setSampleLength

public void setSampleLength(int samplen)

setName

public void setName(java.lang.String name)

setInputT

public void setInputT(double ttime,
                      double inputt)

setInputS

public void setInputS(Complex input)

resetZero

public void resetZero()

calcPolesZerosS

protected void calcPolesZerosS()

zeroPoleCancellation

protected void zeroPoleCancellation()

evalTransFunctS

public Complex evalTransFunctS()

evalTransFunctS

public Complex evalTransFunctS(Complex sValue)

evalTransFunctS

public Complex evalTransFunctS(double freq)

evalMagTransFunctS

public double evalMagTransFunctS()

evalMagTransFunctS

public double evalMagTransFunctS(Complex sValue)

evalMagTransFunctS

public double evalMagTransFunctS(double freq)

evalPhaseTransFunctS

public double evalPhaseTransFunctS()

evalPhaseTransFunctS

public double evalPhaseTransFunctS(Complex sValue)

evalPhaseTransFunctS

public double evalPhaseTransFunctS(double freq)

evalTransFunctZ

public Complex evalTransFunctZ()

evalTransFunctZ

public Complex evalTransFunctZ(Complex zValue)

evalMagTransFunctZ

public double evalMagTransFunctZ()

evalMagTransFunctZ

public double evalMagTransFunctZ(Complex zValue)

evalPhaseTransFunctZ

public double evalPhaseTransFunctZ()

evalPhaseTransFunctZ

public double evalPhaseTransFunctZ(Complex zValue)

getIntegMethod

public int getIntegMethod()

getZtransformMethod

public int getZtransformMethod()

getSampleLength

public int getSampleLength()

getForgetFactor

public double getForgetFactor()

getCurrentTime

public double getCurrentTime()

getTime

public double[] getTime()

getCurrentInputT

public double getCurrentInputT()

getInputT

public double[] getInputT()

getInputS

public Complex getInputS()

getDeltaT

public double getDeltaT()

getSampFreq

public double getSampFreq()

getS

public Complex getS()

getZ

public Complex getZ()

getSnumerDeg

public int getSnumerDeg()

getSdenomDeg

public int getSdenomDeg()

getSnumer

public ComplexPolynomial getSnumer()

getSdenom

public ComplexPolynomial getSdenom()

getZnumerDeg

public int getZnumerDeg()

getZdenomDeg

public int getZdenomDeg()

getZnumer

public ComplexPolynomial getZnumer()

getZdenom

public ComplexPolynomial getZdenom()

getZerosS

public Complex[] getZerosS()

getPolesS

public Complex[] getPolesS()

getZerosZ

public Complex[] getZerosZ()

getPolesZ

public Complex[] getPolesZ()

getMaptozero

public boolean getMaptozero()

getName

public java.lang.String getName()

plotPoleZeroS

public void plotPoleZeroS()

plotPoleZeroZ

public void plotPoleZeroZ()

plotBode

public void plotBode(double lowFreq,
                     double highFreq)

getCurrentOutputT

public double getCurrentOutputT(double ttime,
                                double inp)

getCurrentOutputT

public double getCurrentOutputT()

getOutputT

public double[] getOutputT()

getOutputS

public Complex getOutputS()

getOutputS

public Complex getOutputS(Complex svalue,
                          Complex inputs)

setNplotPoints

public void setNplotPoints(int nPoints)

getNplotPoints

public int getNplotPoints()

impulseInput

public void impulseInput(double impulseMag,
                         double finalTime)

impulseInput

public void impulseInput(double finalTime)

stepInput

public void stepInput(double stepMag,
                      double finalTime)

stepInput

public void stepInput(double finalTime)

rampInput

public void rampInput(double rampGradient,
                      int rampOrder,
                      double finalTime)

rampInput

public void rampInput(int rampOrder,
                      double finalTime)

rampInput

public void rampInput(double rampGradient,
                      double finalTime)

rampInput

public void rampInput(double finalTime)

transientResponse

public static void transientResponse(int nPoints,
                                     double finalTime,
                                     double deadTime,
                                     ComplexPolynomial numerT,
                                     ComplexPolynomial denomT,
                                     java.lang.String graphtitle1,
                                     java.lang.String graphtitle2)

timeTerm

public static Complex timeTerm(double ttime,
                               Complex coeff,
                               Complex constant,
                               Complex power)

inverseTransform

public static Complex[][] inverseTransform(ComplexPolynomial numer,
                                           ComplexPolynomial denom)