Package flanagan.complex

Examples of flanagan.complex.Complex.times()


        Complex den = new Complex();
        den = this.sValue.times(this.aConst);
        den = den.plus(this.bConst);
        Complex term = new Complex();
        term = num.over(den);
        super.outputS = term.times(super.inputS);
        if(super.deadTime!=0.0D)super.outputS = super.outputS.times(Complex.exp(super.sValue.times(-super.deadTime)));
        return super.outputS;
    }

    //  Calculate the current time domain output for a given input and given time
View Full Code Here


        Complex zVal4 = Complex.sqrt(zVal3);
        Complex zVal5 = zVal2.times(zVal4);
        Complex zVal6 = Complex.tanh(zVal5);
        Complex zVal7 = zVal1.times(zVal6);
        Complex zVal8 = Complex.plusOne().minus(Complex.plusJay());
        return zVal8.times(zVal7);
    }

    // Get the constant phase element impedance
    public static Complex constantPhaseElementImpedance(double cpeCoeff, double alpha, double omega){
        Complex jOmega = new Complex(0.0D, omega);
View Full Code Here

    // Get the constant phase element impedance
    public static Complex constantPhaseElementImpedance(double cpeCoeff, double alpha, double omega){
        Complex jOmega = new Complex(0.0D, omega);
        Complex jOmegaAlpha = Complex.pow(jOmega,-alpha);
        Complex coeff = new Complex(cpeCoeff, 0.0D);
        return coeff.times(jOmegaAlpha);
    }

    // Calculate the impedance of two impedances in series
    public static Complex impedanceInSeries(Complex z1, Complex z2){
        return z1.plus(z2);
View Full Code Here

        double temp0 = Math.cos(beta*this.lineLength);
        double temp1 = Math.sin(beta*this.lineLength);
        Complex temp2 = ( new Complex(0.0D, temp1*zed0) ).plus(this.loadImpedance.times(temp0));
        Complex temp3 = ( new Complex(temp0*zed0, 0.0D) ).plus( Complex.plusJay().times( this.loadImpedance.times(temp1) ) );
        Complex temp4 = temp2.over(temp3);
        this.idealInputImpedance = temp4.times(zed0);
        return this.idealInputImpedance;
    }

    // SHORTED LINE IMPEDANCES
    // get shorted line impedance of a general line
View Full Code Here

                    bi = null;
                    productbi = null;
                    break;
            case 14: Complex[] cc = this.getArray_as_Complex();
                    Complex productcc = Complex.plusOne();
                    for(int i=0; i<this.length; i++)productcc.times(cc[i]);
                    this.productt.add(productcc);
                    break;
            case 15: Phasor[] pp = this.getArray_as_Phasor();
                    Phasor productpp = Phasor.plusOne();
                    for(int i=0; i<this.length; i++)productpp.times(pp[i]);
View Full Code Here

        Complex term2 = Complex.plusOne();
        Complex term3 = Complex.plusOne();
        term1 = term1.times(this.kp);
        term2 = term2.times(this.ki);
        term2 = term2.over(this.sValue);
        term3 = term3.times(this.kd);
        term3 = term3.times(super.sValue);
        Complex term = term1.plus(term2.plus(term3));
        super.outputS = term.times(super.inputS);
        if(super.deadTime!=0.0D)super.outputS = super.outputS.times(Complex.exp(super.sValue.times(-super.deadTime)));
        return super.outputS;    }
View Full Code Here

        Complex term3 = Complex.plusOne();
        term1 = term1.times(this.kp);
        term2 = term2.times(this.ki);
        term2 = term2.over(this.sValue);
        term3 = term3.times(this.kd);
        term3 = term3.times(super.sValue);
        Complex term = term1.plus(term2.plus(term3));
        super.outputS = term.times(super.inputS);
        if(super.deadTime!=0.0D)super.outputS = super.outputS.times(Complex.exp(super.sValue.times(-super.deadTime)));
        return super.outputS;    }
View Full Code Here

        term2 = term2.times(this.ki);
        term2 = term2.over(this.sValue);
        term3 = term3.times(this.kd);
        term3 = term3.times(super.sValue);
        Complex term = term1.plus(term2.plus(term3));
        super.outputS = term.times(super.inputS);
        if(super.deadTime!=0.0D)super.outputS = super.outputS.times(Complex.exp(super.sValue.times(-super.deadTime)));
        return super.outputS;    }

    //  Get the s-domain output for the stored input and  s-value.
    public Complex getOutputS(){
View Full Code Here

        Complex term2 = Complex.plusOne();
        Complex term3 = Complex.plusOne();
        term1 = term1.times(this.kp);
        term2 = term2.times(this.ki);
        term2 = term2.over(this.sValue);
        term3 = term3.times(this.kd);
        term3 = term3.times(super.sValue);
        Complex term = term1.plus(term2.plus(term3));
        super.outputS = term.times(super.inputS);
        if(super.deadTime!=0.0D)super.outputS = super.outputS.times(Complex.exp(super.sValue.times(-super.deadTime)));
        return super.outputS;
View Full Code Here

        Complex term3 = Complex.plusOne();
        term1 = term1.times(this.kp);
        term2 = term2.times(this.ki);
        term2 = term2.over(this.sValue);
        term3 = term3.times(this.kd);
        term3 = term3.times(super.sValue);
        Complex term = term1.plus(term2.plus(term3));
        super.outputS = term.times(super.inputS);
        if(super.deadTime!=0.0D)super.outputS = super.outputS.times(Complex.exp(super.sValue.times(-super.deadTime)));
        return super.outputS;
   }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.