Michael Thomas Flanagan's Java Scientific Library

HighPassPassive Class:      Models a High Pass Passive Filter for Control Theory Simulations

     

Last update: 8 November 2009                                                                                                                              Main Page of Michael Thomas Flanagan's Java Scientific Library

This class contains the constructor to create an instance of a simple high pass passive filter and the methods to use this in control simulations:



The transfer fuction in the time domain, G(t), may be described by Equation 1:

where vi(t) is the input voltage, vo(t) is the output voltage, ω is the radial frequency of the input signal, R is the resistance value and C is the capacitance value.
The transfer fuction in the s-domain, G(s), may be described by Equation 2:

where the time constant, τ, may be entered as such or calculated from the entered resistance and capacitance values, i.e. τ = RC.
This is a subclass of the superclass BlackBox



import directive: import flanagan.control.HighPassPassive;

SUMMARY OF CONSTRUCTORS AND METHODS

METHODS FOUND ONLY IN THE SUBCLASS HighPassPassive

Constructor   public HighPassPassive()
Constants Set the constants public void setTimeConstant(double tau)
public void setResistance(double res)
public void setCapacitance(double cap)
Get the constants public double getTimeConstant()
public double getResistance()
public double getCapacitance()

METHODS INHERITED FROM THE SUPERCLASS BlackBox

Deep Copy   public HighPassPassive copy()
Overridden
public Object clone()
Overridden
s-domain transfer function Get the numerator degree public int getSnumerDeg()
Not overridden
Get the numerator polynomial public ComplexPoly getSnumer()
Not overridden
Get the denominator degree public int getSdenomDeg()
Not overridden
Get the denominator polynomial public ComplexPoly getSdenom()
Not overridden
Get the s-values of the poles publicComplex[ ] getPolesS()
Not overridden
Get the s-values of the zeros publicComplex[ ] getZerosS()
Overridden
Plot poles and zeros public void plotPolesZeroS()
Not overridden
Set the value of the Laplace s variable public void setS(Complex sValue)
Not overridden
public void setS(double sReal, double sImag)
Not overridden
public void setS(double sImag)
Not overridden
Get the Laplace s value public Complex getS()
Not overridden
Evaluate transfer function public Complex evalTransFunctS()
Not overridden
public Complex evalTransFunctS(Complex sValue)
Not overridden
public Complex evalTransFunctS(double freq)
Not overridden
Evaluate transfer function magnitude public double evalMagTransFunctS()
Not overridden
public double evalMagTransFunctS(Complex sValue)
Not overridden
public double evalMagTransFunctS(double freq)
Not overridden
Evaluate transfer function phase public double evalPhaseTransFunctS()
Not overridden
public double evalPhaseTransFunctS(Complex sValue)
Not overridden
public double evalPhaseTransFunctS(double freq)
Not overridden
Bode plots (magnitude and phase) public void plotBode(double lowFreq, double highFreq,)
Not overridden
Inverse Laplace Transform public static Complex[ ] [ ] inverseTransform(ComplexPoly numer, ComplexPoly Not overridden
public static Complex timeTerm(double time, Complex coeff, Complex constant, Complex power)
Not overridden
Set the input in the s-domain public void setInputS(Complex input)
Not overridden
Get the input in the s-domain public Complex getInputS()
Not overridden
Get the output in the s-domain public Complex getOutputS()
Overridden
public Complex getOutputS(Complex sValue, Complex input)
Overridden
Dead Time
(transportation time)
Set the dead time public void setDeadtime(double deadTime)
Not overridden
public void setDeadtime(double deadTime, double padeOrder)
Not overridden
Get the dead time public double getDeadtime()
Not overridden
Set the Pade order public void setPadeOrder(double padeorder)
Not overridden
Get the Pade order public void setPadeOrder(double padeorder)
Not overridden
Continuous time domain
(uses the s-domain transfer function)
Plot step input transient public void stepInput(double finaltime)
Overridden
public void stepInput(double mag, double finaltime)
Overridden
Plot ramp input transient public void rampInput(double finaltime)
Overridden
public void rampInput(double mag, double finaltime)
Overridden
public void rampInput(int order, double finaltime)
Overridden
public void rampInput(double mag, int order, double finaltime)
Overridden
z-domain transfer function Map s-transfer function into the z-domain public void zTransform()
Overridden
public void zTransform(double deltaT)
Overridden
Get the numerator degree public int getZnumerDeg()
Not overridden
Get the numerator polynomial public ComplexPoly getZnumer()
Not overridden
Get the denominator degree public int getZdenomDeg()
Not overridden
Get the denominator polynomial public ComplexPoly getZdenom()
Not overridden
Get the z-values of the poles publicComplex[ ] getPolesZ()
Not overridden
Get the z-values of the zeros publicComplex[ ] getZerosZ()
Not overridden
Plot poles and zeros public void plotPolesZeroZ()
Not overridden
Set the value of the z variable public void setZ(Complex zValue)
Not overridden
public void setZ(double zReal, double zImag)
Not overridden
Get the z value public Complex getZ()
Not overridden
Evaluate transfer function public Complex evalTransFunctZ()
Not overridden
public Complex evalTransFunctZ(Complex zValue)
Not overridden
Evaluate transfer function magnitude public double evalMagTransFunctZ()
Not overridden
public double evalMagTransFunctZ(Complex zValue)
Not overridden
Evaluate transfer function phase public double evalPhaseTransFunctZ()
Not overridden
public double evalPhaseTransFunctZ(Complex zValue)
Not overridden
Sampled signal Set the sampling length public void setSampleLdength(int samplelength)
Not overridden
Get the sampling length public int getSampleLength()
Not overridden
Set the sampling period public void setDeltaT(double deltaT)
Not overridden
Get the sampling period public double getDeltaT()
Not overridden
Set the sampling frequency public void setSampFreq(double sfreq)
Not overridden
Get the sampling frequency public double getSampFreq()
Not overridden
Set the sampled input and time public void setInputT(double time, double input)
Not overridden
Get the current value of the time public double getCurrentTime()
Not overridden
Get the array of times public double[] getTime()
Not overridden
Get the current value of the input public double getCurrentInputT()
Not overridden
Get the array of the inputs public double[] getInputT()
Not overridden
Calculate the current value of the output public double calcOutputT()
Overridden
public double calcOutputT(double time, double input) Overridden
Get the current value of the output public double getCurrentOutputT()
Not overridden
Get the array of the outputs public double getOutputT()
Not overridden
Set numerical integration method public void setIntegrateMethod(int integMethod)
Not overridden
public void setIntegrateMethod(String integMethodOpt)
Not overridden
Get numerical integration method public int getIntegrateMethod()
Not overridden
General methods Reset all inputs, outputs and times to zero public void resetZero()
Not overridden
Set the name of the black box public void setName(String name)
Not overridden
Get the name of the black box public String getName()
Not overridden



CONSTRUCTOR

public HighPassPassive()
Usage:                      HighPassPassive high = new HighPassPassive();
This constructor creates a new instance of HighPassPassive with the time constant, τ, in Equation 2 (above) initialised to unity.



CONSTANTS

SET THE CONSTANTS
public void setTimeConstant(double tau)
Usage:                      high.setTimeConstant(tau);
This method allows the time constant, τ in Equation 2 (above), to be entered.

public void setResistance(double res)
Usage:                      high.setResistance(res);
This method allows the resistance, R in Equation 1 (above), to be entered. It also recalculates the value of the time constant, τ in Equation 2 (above), as RC.

public void setcapacitance(double cap)
Usage:                      high.setCapacitance(cap);
This method allows the capacitance, C in Equation 1 (above), to be entered. It also recalculates the value of the time constant, τ in Equation 2 (above), as RC.



GET THE CONSTANTS
public double getTimeConstant()
Usage:                      tau = high.getTimeConstant();
Returns the time constant τ in Equation 2 (above).

public double getResistance()
Usage:                      res = high.getResistance();
Returns the resistance, R in Equation 1 (above), if it has been entered.

public double getCapacitance()
Usage:                      cap = high.getCapacitance();
Returns the capacitance, C in Equation 1 (above), if it has been entered.



OTHER CLASSES USED BY THIS CLASS

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

This page was prepared by Dr Michael Thomas Flanagan