Results
Getting the Results
The result values from measurement.Results are double and complex arrays.
Event Based Result Reading
To get results during a measurement one can use the NewResultAvailable(int index) event. This event will give you the index of the actual measured result. To gather the result use the (ResultType)At(int index) methods which every result type supports. e.g. measurement.Results.MagnitudeAt(int index, MagnitudeUnit unit) or measurement.Results.ComplexValueAt(int index).
Important
- Do NOT use the function which are returning the whole array DURING a measurement. e.g measurement.result.Magnitude(MagnitudeUnit unit). If not necessary! They are very slow.
- Do not read QTg and Tg results during the sweep since they are calculated using next neighbour difference.
Note
If QTg or Tg is used in NewResultAvailable(int index) it is important to skip the first measured point. Since they need a neighbour value.
Best Practice Example:
meas.NewResultAvailable += (index) =>
{
//All other results can be used like this
phaseFromEvent[index] = meas.Results.PhaseAt(index, AngleUnit.Degree);
realFromEvent[index] = meas.Results.RealAt(index);
magDB[index] = meas.Results.MagnitudeAt(index, MagnitudeUnit.dB);
//For QTg and Tg is is important to skip the first (0) index.
if (index < 1) return;
//Then one can get the (index - 1) of QTg
gainQtgFromEvent[index - 1] = meas.Results.QTgAt(index - 1);
groupDelayTgAt[index - 1] = meas.Results.GroupDelayTgAt(index - 1);
//If the last point is reached, we have to read the (index - 1) like above AND the very last point (index) like below.
if (index == numberOfPoints - 1)
{
gainQtgFromEvent[index] = meas.Results.QTgAt(index);
groupDelayTgAt[index] = meas.Results.GroupDelayTgAt(index);
}
};
Result Types
- Gain Results
- Impedance Results
- Reflection Results
- Admittance Results
- VRMS and Overload Special Results
Gain Results
Functions
Result Type Parameter Explanation GroupDelayTg double[] none Gets the GroupDelay as a double array. Phase double[] AngleUnit Gets the Phase as a double array. UnwrappedPhase double[] AngleUnit Gets the Unwrapped Phase as a double array. Magnitude double[] MagnitudeUnit Gets the Magnitude as a double array. Either as DB or Lin values. ComplexValues Complex[] none Gets all measured values as a complex array. Real double[] none Gets the real part of the complex values as double array. Imaginary double[] none Gets imaginary part of the complex values as double array. QTg double[] none Gets the quality values derived from the group delay as double array. MeasurementFrequencies double[] none Gets measured frequencies as double array. Special Results
Result Type Explanation VRMS VRMS Object Gets a VRMS object which contains Properties for Channel 1 and 2 VRMS values. OverloadLevel OverloadResult Object Gets a OverloadResult object which contains Properties for Channel 1 and 2 OverloadLevel values.
Impedance Results
Functions
Result Type Parameter Explanation GroupDelayTg double[] none Gets the GroupDelay as a double array. Phase double[] AngleUnit Gets the Phase as a double array. UnwrappedPhase double[] AngleUnit Gets the Unwrapped Phase as a double array. Magnitude double[] MagnitudeUnit Gets the Magnitude as a double array. Either as DB or Lin values. ComplexValues Complex[] none Gets all measured values as a complex array. Real double[] none Gets the real part of the complex values as double array. Imaginary double[] none Gets imaginary part of the complex values as double array. MeasurementFrequencies double[] none Gets measured frequencies as double array. Cs double[] none Gets the serial capacity as double array. Ls double[] none Gets the serial inductivity as double array. Rs double[] none Gets the serial resistance as double array. Q double[] none Gets the quality values as double array. QTg double[] none Gets the quality values derived from the group delay as double array. Special Results
Result Type Explanation VRMS VRMS Object Gets a VRMS object which contains Properties for Channel 1 and 2 VRMS values. OverloadLevel OverloadResult Object Gets a OverloadResult object which contains Properties for Channel 1 and 2 OverloadLevel values. AsAdmittance AdmittanceResult Object Gets the result as an admittance result objcet. AsReflection ReflectionResult Object Gets the result as an reflection result objcet.
Reflection Results
Functions
Result Type Parameter Explanation GroupDelayTg double[] none Gets the GroupDelay as a double array. Phase double[] AngleUnit Gets the Phase as a double array. UnwrappedPhase double[] AngleUnit Gets the Unwrapped Phase as a double array. Magnitude double[] MagnitudeUnit Gets the Magnitude as a double array. Either as DB or Lin values. ComplexValues Complex[] none Gets all measured values as a complex array. Real double[] none Gets the real part of the complex values as double array. Imaginary double[] none Gets imaginary part of the complex values as double array. MeasurementFrequencies double[] none Gets measured frequencies as double array. VSWR double[] none Gets the VSWR as double array. QTg double[] none Gets the quality values derived from the group delay as double array. Special Results
Result Type Explanation VRMS VRMS Object Gets a VRMS object which contains Properties for Channel 1 and 2 VRMS values. OverloadLevel OverloadResult Object Gets a OverloadResult object which contains Properties for Channel 1 and 2 OverloadLevel values. AsAdmittance AdmittanceResult Object Gets the result as an admittance result objcet. AsImpedance ImpedanceResult Object Gets the result as an impedance result objcet.
Admittance Results
Functions
Result Type Parameter Explanation GroupDelayTg double[] none Gets the GroupDelay as a double array. Phase double[] AngleUnit Gets the Phase as a double array. UnwrappedPhase double[] AngleUnit Gets the Unwrapped Phase as a double array. Magnitude double[] MagnitudeUnit Gets the Magnitude as a double array. Either as DB or Lin values. ComplexValues Complex[] none Gets all measured values as a complex array. Real double[] none Gets the real part of the complex values as double array. Imaginary double[] none Gets imaginary part of the complex values as double array. MeasurementFrequencies double[] none Gets measured frequencies as double array. Cp double[] none Gets the parallel capacity as double array. Lp double[] none Gets the parallel inductivity as double array. Rp double[] none Gets the parallel resistance as double array. Q double[] none Gets the quality values as double array. QTg double[] none Gets the quality values derived from the group delay as double array. Special Results
Result Type Explanation VRMS VRMS Object Gets a VRMS object which contains Properties for Channel 1 and 2 VRMS values. OverloadLevel OverloadResult Object Gets a OverloadResult object which contains Properties for Channel 1 and 2 OverloadLevel values.
VRMS and Overload Special Results
VRMS
Properties Type Explanation Channel1 double[] Gets the voltage root mean square values of channel 1 Channel2 double[] Gets the voltage root mean square values of channel 2 Overload
Properties Type Explanation Channel1 double[] Gets the overload level of channel 1 (A value greater than 1.0 means that an overload occurred) Channel2 double[] Gets the overload level of channel 2 (A value greater than 1.0 means that an overload occurred)
Advanced Results
Resonance Frequency Results
The obtained result types provide the possibilty to search for resonances. This feature searches for the largest global resonance and calculates the resonance frequency, the bandwidth and the Q factor for the found resonance. For further information please refer to the Bode Automation Interface documentation:
CalculateFResQValues(Boolean, Boolean, FResQFormats) (GainResults)
CalculateFResQValues(Boolean, Boolean, FResQFormats) (AdmittanceResult)
CalculateFResQValues(Boolean, Boolean, FResQFormats) (ImpedanceResult)
CalculateFResQValues(Boolean, Boolean, FResQFormats) (ReflectionResult)
Stability Margin Results
The Gain Results provide the possibilty to perform a stability margin calculation. This feature calculates the Gain margin, the Phase margin and the Stability Margin for the given results. For further information please refer to the Bode Automation Interface documentation: