Package flanagan.complex

Examples of flanagan.complex.ComplexPoly


    private double ki = 0.0D;           //  integral gain

    // Constructor - unit proportional gain, zero integral gain
    public PropInt(){
        super("PropInt");
        super.setSnumer(new ComplexPoly(0.0D, 1.0D));
        super.setSdenom(new ComplexPoly(0.0D, 1.0D));
        super.setZtransformMethod(1);
        super.addDeadTimeExtras();
    }
View Full Code Here


        if(super.deltaT==0.0D)System.out.println("z-transform attempted in PropInt with a zero sampling period");
        if(super.ztransMethod==0){
            this.mapstozAdHoc();
        }
        else{
            super.zDenom = new ComplexPoly(1);
            Complex[] coef = Complex.oneDarray(2);
            coef[0].reset(-1.0D,0.0D);
            coef[1].reset(1.0D,0.0D);
            super.zDenom.resetPoly(coef);
            Complex[] zPoles = Complex.oneDarray(1);
            zPoles[0].reset(1.0D, 0.0D);
            super.zNumer = new ComplexPoly(1);
            Complex[] zZeros = Complex.oneDarray(1);
            double kit = this.ki*super.deltaT;
            switch(this.integMethod){
                // trapezium rule
                case 0: coef[0].reset(kit/2.0D - this.kp, 0.0D);
View Full Code Here

    // Constructor - all constants = 1
    public Compensator(){
        super("Compensator");
        super.sZeros = Complex.oneDarray(1);
        super.sPoles = Complex.oneDarray(1);
        super.setSnumer(new ComplexPoly(1.0D, 1.0D));
        super.setSdenom(new ComplexPoly(1.0D, 1.0D));
        super.setZtransformMethod(1);
        super.addDeadTimeExtras();
    }
View Full Code Here

        this.aConst = aa;
        this.bConst = bb;
        this.kConst = kk;
        super.sZeros = Complex.oneDarray(1);
        super.sPoles = Complex.oneDarray(1);
        super.setSnumer(new ComplexPoly(this.aConst*kConst, kConst));
        super.setSdenom(new ComplexPoly(this.bConst, 1.0D));
        super.setZtransformMethod(1);
        super.addDeadTimeExtras();
    }
View Full Code Here

    private double kp = 1.0D;           //  proportional gain

    // Constructor - unit proportional gain
    public Prop(){
        super("Prop");
        super.setSnumer(new ComplexPoly(1.0D));
        super.setSdenom(new ComplexPoly(1.0D));
        super.setZtransformMethod(1);
        super.addDeadTimeExtras();
        super.sNumerScaleFactor = Complex.plusOne();
        super.sDenomScaleFactor = Complex.plusOne();
    }
View Full Code Here

    // Constructor - set P gain
    public Prop(double kp){
        super("Prop");
        this.kp=kp;
        super.setSnumer(new ComplexPoly(this.kp));
        super.setSdenom(new ComplexPoly(1.0D));
        super.setZtransformMethod(1);
        super.addDeadTimeExtras();
        super.sNumerScaleFactor = new Complex(kp, 0.0);
        super.sDenomScaleFactor = Complex.plusOne();
    }
View Full Code Here

    // Perform z transform using an already set delta T
    public void zTransform(){
        super.zNumerDeg = 0;
        super.zDenomDeg = 0;
        super.zNumer = new ComplexPoly(this.kp);
        super.zDenom = new ComplexPoly(1.0D);
    }
View Full Code Here

    // Sets time constant to unity and the order to unity
    public LowPassPassive(){
        super("PassiveLowPass");
        super.sPoles = Complex.oneDarray(1);
        super.setSnumer(new ComplexPoly(1.0D));
        super.setSdenom(new ComplexPoly(1.0D, 1.0D));
        super.setZtransformMethod(1);
        super.addDeadTimeExtras();
        this.timeConstant = 1.0D;
    }
View Full Code Here

    // Constructor - unit proportional gain, zero derivative gain
    public PropDeriv(){
        super("PropDeriv");
        super.sNumerDeg = 1;
        super.sDenomDeg = 0;
        super.setSnumer(new ComplexPoly(1.0D, 0.0D));
        super.setSdenom(new ComplexPoly(1.0D));
        super.setZtransformMethod(1);
        super.addDeadTimeExtras();

    }
View Full Code Here

            this.mapstozAdHoc();
        }
        else{
            super.zNumerDeg = 1;
            super.zDenomDeg = 1;
            super.zNumer = new ComplexPoly(-this.kd, this.kp*super.deltaT + this.kd);
            super.zDenom = new ComplexPoly(0.0D, super.deltaT);
            super.zZeros = Complex.oneDarray(1);
            super.zZeros[0].reset(this.kd/(this.kp*super.deltaT + this.kd),0.0D);
            super.zPoles = Complex.oneDarray(1);
            super.zPoles[0].reset(0.0D, 0.0D);
        }
View Full Code Here

TOP

Related Classes of flanagan.complex.ComplexPoly

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.