Package flanagan.complex

Examples of flanagan.complex.ComplexPoly


        // Enter zeros: array of double coefficients
        public void setNumerator(double[] numer){
            if(numer!=null){
                this.nDeg = numer.length-1;
                if(this.nDeg>0){
                    this.numerPoly = new ComplexPoly(numer);;
                    this.numerRoots = Complex.oneDarray(nDeg);
                    if(!this.noPoles){
                        this.mDeg = Math.max(nDeg, dDeg);
                    }
                    else{
View Full Code Here


        // Enter poles: array of Complex coefficients
        public void setDenominator(Complex[] denom){
            if(denom!=null){
                this.dDeg = denom.length-1;
                if(this.dDeg>0){
                    this.denomPoly = new ComplexPoly(denom);;
                    this.denomRoots = Complex.oneDarray(dDeg);
                    if(!this.noZeros){
                        this.mDeg = Math.max(nDeg, dDeg);
                    }
                    else{
View Full Code Here

        // Enter poles: array of double coefficients
        public void setDenominator(double[] denom){
            if(denom!=null){
                this.dDeg = denom.length-1;
                if(this.dDeg>0){
                    this.denomPoly = new ComplexPoly(denom);;
                    this.denomRoots = Complex.oneDarray(dDeg);
                    if(!this.noZeros){
                        this.mDeg = Math.max(nDeg, dDeg);
                    }
                    else{
View Full Code Here

    // set the numerators and denominators
    // same polynomials, using Pade approximation for Pade and non-Pade forms
    public void setNumDen(double deltaT){
        // set denominator, s
        super.sDenom = new ComplexPoly(0.0D, 1.0D);
        super.sPoles[0].reset(0.0D, 0.0D);

        // set exp(-sT) part of pade numerator
        super.sNumer = new ComplexPoly(1.0D);
        super.deadTime = deltaT;
        super.pade();
        super.deadTime = 0.0D;

        // add 1 to exp(-sT)[=padeNumer/padeDenom]/s
View Full Code Here

    private double kd = 0.0D;           //  derivative gain

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

                                if(((String)temp.get(0)).equals("complex"))realRoots = false;
                                break;
                        case 4: temp = RealRoot.cubic(coeffWz[0],coeffWz[1],coeffWz[2], coeffWz[3]);
                                if(((String)temp.get(0)).equals("complex"))realRoots = false;
                                break;
                        default: ComplexPoly cp = new ComplexPoly(coeffWz);
                                Complex[] croots = cp.roots(polish, new Complex(estx, 0.0));
                                cdreal = new double[nCoeffWz-1];
                                int counter = 0;
                                for(int i=0; i<(nCoeffWz-1); i++){
                                    if(croots[i].getImag()/croots[i].getReal()<RealRoot.realTol){
                                        cdreal[i] = croots[i].getReal();
View Full Code Here

    public PropDeriv(){
        super("PD");

        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

    // Sets time constant and order to unity
    public HighPassPassive(){
        super("Passive High Pass Filter");
        super.sZeros = Complex.oneDarray(1);
        super.sPoles = Complex.oneDarray(1);
        super.setSnumer(new ComplexPoly(0.0D, 1.0D));
        super.setSdenom(new ComplexPoly(1.0D, 1.0D));
        super.setZtransformMethod(1);
        super.addDeadTimeExtras();
        this.timeConstant = 1.0D;
    }
View Full Code Here

        // combine closed path boxes
        this.closedPath.consolidate();

        // Calculate transfer function
        ComplexPoly fpNumer = this.forwardPath.getSnumer();
        ComplexPoly fpDenom = this.forwardPath.getSdenom();
        ComplexPoly cpNumer = this.closedPath.getSnumer();
        ComplexPoly cpDenom = this.closedPath.getSdenom();
        if(fpDenom.isEqual(cpDenom)){
            super.sNumer = fpNumer.copy();
            this.sDenom = (cpNumer.plus(fpDenom)).copy();
        }
        else{
            super.sNumer = fpNumer.times(cpDenom);
            super.sDenom = cpNumer.plus(cpDenom.times(fpDenom));
        }
        this.checkConsolidate = true;
    }
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.