Michael Thomas Flanagan's Java Scientific LibraryFirstOrder Class:      Control Theory First Order Process

Last update: 23 May 2010                                                                                                                              Main Page of Michael Thomas Flanagan's Java Scientific Library

This class contains the constructor to create an instance of a First Order Process and the methods to use this in both continuous time and discrete control simulations.
This is a subclass of the superclass BlackBox

The First Order Process may be described by the Equation 1:

where i(t) is the input to the controller, o(t) is the output and a, b and c are constants.
Methods incorporating a Laplace transform of the first derivative assume a quiescent state before the input at zero time, i.e.
O(s)/I(s) = c/(b + a.s).

import directive: import flanagan.control.FirstOrder;

### METHODS FOUND ONLY IN THE SUBCLASS FirstOrder

 Constructors public FirstOrder() public FirstOrder(double aConst, double bConst, double cConst) First Order Constants Set the a, b and c constants public void setCoeff(double aConst, double bConst, double cConst) public void setA(double aConst) public void setB(double bConst) public void setC(double cConst) Get the a, b and c constants public double getA() public double getB() public double getC() Get the time constant, a/b public double getTimeConstant()

### CONSTRUCTORS

public FirstOrder()
public FirstOrder(double aConst, double bConst, double cConst)
Usage:                      FirstOrder fo = new FirstOrder();
This constructor creates a new instance of FirstOrder with the constants a, b and c in Equation 1 (above) initialised to unity.
Usage:                      FirstOrder fo = new FirstOrder(aConts, bConst, cConst);
This constructor creates a new instance of FirstOrder with the constants a, b and c in Equation 1 (above) initialised to the doubles passed in the argument list, e.g. to aConst, bConst and cConstd in the above usage.

### FIRST ORDER PROCESS CONSTANTS

SET THE CONSTANTS
public void setCoeff(double aConst, double bConst, double cConst)
Usage:                      fo.setCoeff(aConts, bConst, cConst);
Resets the constants a, b and c in Equation 1 (above) initialised to the doubles passed in the argument list, e.g. to aConst, bConst and cConstd in the above usage.

public void setA(double aConst)
Usage:                      fo.setA(aConst);
Resets the constant a in Equation 1 (above) to the value in the double passed in the argument list, e.g. to aConst in the above usage.

public void setB(double bConst)
Usage:                      fo.setB(bConst);
Resets the constant b in Equation 1 (above) to the value in the double passed in the argument list, e.g. to bConst in the above usage.

public void setC(double cConst)
Usage:                      fo.setC(cConst);
Resets the constant c in Equation 1 (above) to the value in the double passed in the argument list, e.g. to cConst in the above usage.

GET THE CONSTANTS
public double getA()
Usage:                      aConst = fo.getA();
Returns the constant a in Equation 1 (above).

public double getB()
Usage:                      bConst = fo.getB();
Returns the constant b in Equation 1 (above).

public double getC()
Usage:                      cConst = fo.getC();
Returns the constant c in Equation 1 (above).

GET THE TIME CONSTANTS, a/b
public double getTimeConstant()
Usage:                      ti = fo.getTimeConstant();
Returns the time constant, a/b.

CALCULATE THE OUTPUT IN THE SAMPLED TIME DOMAIN
public Complex getOutputT()
public Complex getOutputT(double time, Complex input)
Usage:                      output = fo.getOutputT();
Calculates and stores the output for the current stored sampled input and time.

Usage:                      output = fo.getOutputT(time, input);
Returns the output for a given sampled input and time. The sampling period, deltaT, is calculated using the previous sampling time.

### OTHER CLASSES USED BY THIS CLASS

This class is a subclass of BlackBox which uses the following classes in this library:
FirstOrder also calls directly: