/// <summary> /// Returns the nominal (Item1), min (Item2), and max (Item3) allowed HBM Peak Current to be within JS-001 specification /// </summary> /// <param name="hbmVoltage">The voltage of the HBM pulse waveform (polarity is ignored, absolute value will be used)</param> /// <returns>The nominal (Item1), min (Item2), and max (Item3) allowed HBM Peak Current to be within JS-001 specification</returns> internal static Tuple <double, double, double> HBMPeakCurrentNominalMinMax(double hbmVoltage) { double absHBMVoltage = System.Math.Abs(hbmVoltage); HBM0OhmJS001WaveformCharacteristicsSet set = HBM0OhmJS001WaveformCharacteristics.GenerateSetForHBMVoltage(absHBMVoltage); return(new Tuple <double, double, double>( DoubleRangeExtensions.CenterOfRange(set.PeakCurrent.Item1, set.PeakCurrent.Item2), set.PeakCurrent.Item1, set.PeakCurrent.Item2)); }
/// <summary> /// Calculates the Peak Current (Ips) related values /// </summary> private void CalculatePeakCurrent() { // Calculate the (absolute) Max Current DataPoint DataPoint ipsMaxAbsoluteDataPoint = this.IpsMaxDataPoint.InvertYValueIfNegativePolarity(this.WaveformIsPositivePolarity); // Determine Ips by evaluating the ips Polynomial at the IpsMax time double ipsAbsoluteValue = this.AbsoluteIpsPolynomial.Evaluate(ipsMaxAbsoluteDataPoint.X); // Determine the Peak Current (Ips) value this.PeakCurrentValue = ipsAbsoluteValue.InvertValueIfNegativePolarity(this.WaveformIsPositivePolarity); // Create a DataPoint at the time of Ips with the Ips value this.PeakCurrentDataPoint = new DataPoint(ipsMaxAbsoluteDataPoint.X, this.PeakCurrentValue); // Determine the min and max allowed values for the Peak Current to be passing Tuple <double, double, double> nomMinMaxPeakCurrent = HBM0OhmJS001WaveformCharacteristics.HBMPeakCurrentNominalMinMax(this.SignedVoltage); this.PeakCurrentAllowedMinimum = nomMinMaxPeakCurrent.Item2.InvertValueIfNegativePolarity(this.WaveformIsPositivePolarity); this.PeakCurrentAllowedMaximum = nomMinMaxPeakCurrent.Item3.InvertValueIfNegativePolarity(this.WaveformIsPositivePolarity); // Determine if the Peak Current is passing this.PeakCurrentIsPassing = DoubleRangeExtensions.BetweenInclusive(this.PeakCurrentAllowedMinimum, this.PeakCurrentAllowedMaximum, this.PeakCurrentValue); }