Microwave filters GUI  2.0.3
Public Member Functions | List of all members
mwfiltersgui.SensitivityAnalysis Class Reference

Class for sensitivity analysis. More...

Public Member Functions

def __init__
 Constructor: creates SensitivityAnalisys class instance.
def runAnalysis
 Run Monte Carlo analysis with random variations in coupling matrix elements.
def randomVariations
 Returns a randomly modified coupling matrix with maximum element variations determined by function arguments.
def plotSensitivity
 Plot [S] parameters magnitude and phase graph, if they are available.

Detailed Description

Class for sensitivity analysis.

Definition at line 2736 of file mwfiltersgui.py.

Constructor & Destructor Documentation

def mwfiltersgui.SensitivityAnalysis.__init__ (   self,
  parent 
)

Constructor: creates SensitivityAnalisys class instance.

        @param parent = Parent widget, in this case is coupling matrix mainWindow.

Copy of the coupling matrix mainWindow class instance. It is necessary to store a copy since it must be accessed by some member functions. QwtPlot that contains the Magnitude and Phase S-parameter plot for all random realizations. Numpy array with columns containing S11 for each random realization. Numpy array with columns containing S21 for each random realization. Numpy array with columns containing S22 for each random realization. Numpy array with columns containing phase of S11 for each random realization. Numpy array with columns containing phase of S21 for each random realization. Numpy array with columns containing phase of S22 for each random realization. Numpy array with columns containing groupDelay for each random realization. [S] parameters class instance, used to compute the [S] parameters after random variations in coupling matrix.

Definition at line 2743 of file mwfiltersgui.py.

References libcommonfunc.Sparameters.groupDelayM, mwfiltersgui.SensitivityAnalysis.groupDelayM, dbplot.DbPlot.mainWindow, mwfiltersgui.SpecMask.mainWindow, dbplot.AxisScalingDlg.mainWindow, mwfiltersgui.HelpForm.mainWindow, dbplot.EditCurvesDlg.mainWindow, mwfiltersgui.SetCouplingDlg.mainWindow, mwfiltersgui.MatrixEditDlg.mainWindow, mwfiltersgui.PredisZeorsDlg.mainWindow, mwfiltersgui.SensitivityAnalysis.mainWindow, libcommonfunc.Sparameters.phaseS11M, mwfiltersgui.SensitivityAnalysis.phaseS11M, libcommonfunc.Sparameters.phaseS21M, mwfiltersgui.SensitivityAnalysis.phaseS21M, libcommonfunc.Sparameters.phaseS22M, mwfiltersgui.SensitivityAnalysis.phaseS22M, libcommonfunc.Sparameters.S11M, mwfiltersgui.SensitivityAnalysis.S11M, libcommonfunc.Sparameters.S21M, mwfiltersgui.SensitivityAnalysis.S21M, libcommonfunc.Sparameters.S22M, mwfiltersgui.SensitivityAnalysis.S22M, mwfiltersgui.MainWindow.SP, mwfiltersgui.SensitivityAnalysis.SP, libcommonfunc.CouplingMatrices.SP, mwfiltersgui.MainWindow.SPlotMagPhase, and mwfiltersgui.SensitivityAnalysis.SPlotMagPhase.

Member Function Documentation

def mwfiltersgui.SensitivityAnalysis.plotSensitivity (   self)
def mwfiltersgui.SensitivityAnalysis.randomVariations (   self,
  MatQ,
  inout,
  inductive,
  capacitive,
  resistive,
  f0var,
  Qvar 
)

Returns a randomly modified coupling matrix with maximum element variations determined by function arguments.

The random variation has uniform distribution.

Parameters
MatQ= Coupling matrix to which random variations are applied (MatrixQ class instance). It is not modified, and the modified (deep) copy is returned.
inout= Maximum random variation in % of nominal value, for input/output (source/load) couplings. It is applied to elements in first and last rows and columns.
inductive= Maximum random variation in % of nominal value, for inductive couplings. It is applied to positive real parts of out-of-diagonal matrix elements $ \Re M_{ij} > 0 \qquad i \neq j $ .
capacitive= Maximum random variation in % of nominal value, for capacitive couplings. It is applied to negative real parts of out-of-diagonal matrix elements $ \Re M_{ij} < 0 \qquad i \neq j $ .
resistive= Maximum random variation in % of nominal value, for resistive couplings. It is applied to imaginary parts of out-of-diagonal matrix elements $ \Im M_{ij} > 0 \qquad i \neq j $ .
f0var= Maximum random variation in % of nominal value, for resonators resonant frequency.
Qvar= Maximum random variation in % of nominal value, for resonators quality factor.
Returns
modMatQ = Modified coupling matrix, based on a deep copy of the MatQ argument.

In order to obtain the randomly modified resonant frequency, the real part of diagonal elements corresponding to resonating nodes is unnormalized. The random variation is applied to the unnormalized frequency, and it is normalized again to obtain the modified real part of the matrix element.

Diagonal elements corresponding to non-resonant nodes are not modified.

The modified Q of resonators is obtained applying a random variation to the resonator Q of the original matrix (before applying the random variation to resistive couplings). Then, the resistive couplings are randomly modified and the new imaginary part of the diagonal element is computed accounting for the new values of the resistive couplings.

In general, for each node $ n $, the quality factor is

\[ Q_{n} = \frac{1}{G_n \, \mathrm{FBW}} \]

where the loss conductance of the unloaded resonator is:

\[ G_{n} = - \sum_{m=1}^{N} \Im M_{mn} \]

    The losses corresponding to the new \form#285 for resonator \form#62 are:

\[ G'_n = \frac{1}{Q_n' \, \mathrm{FBW}} \]

But, after the random variation of resistive couplings the losses that we have are

\[ G''_n = - \sum_{m=1}^N \Im M''_{nm} \]

so, in order to achieve a quality factor $ Q' $, the modified value of the imaginary part of the diagonal element must be:

\[ \Im M'_{nn} = \Im M''_{nn} + G''_n - G'_n \]

Definition at line 2902 of file mwfiltersgui.py.

Referenced by mwfiltersgui.SensitivityAnalysis.runAnalysis().

Here is the caller graph for this function:

def mwfiltersgui.SensitivityAnalysis.runAnalysis (   self,
  N,
  inout,
  freq,
  Q,
  inductive,
  capacitive,
  resistive 
)

Run Monte Carlo analysis with random variations in coupling matrix elements.

Calls self.randomVariations() to obtain a randomly modified coupling matrix with maximum element variations determined by function arguments.

Parameters
N= Number of Monte Carlo random realizations.
inout= Maximum random variation in % of nominal value, for input/output (source/load) couplings. It is applied to elements in first and last rows and columns.
freq= Maximum random variation in % of nominal value, for resonators resonant frequency.
Q= Maximum random variation in % of nominal value, for resonators quality factor.
inductive= Maximum random variation in % of nominal value, for inductive couplings. It is applied to positive real parts of out-of-diagonal matrix elements.
capacitive= Maximum random variation in % of nominal value, for capacitive couplings. It is applied to negative real parts of out-of-diagonal matrix elements.
resistive= Maximum random variation in % of nominal value, for resistive couplings. It is applied to imaginary parts of out-of-diagonal matrix elements.

Definition at line 2798 of file mwfiltersgui.py.

References libcommonfunc.Sparameters.groupDelayM, mwfiltersgui.SensitivityAnalysis.groupDelayM, libcommonfunc.myPrint(), libcommonfunc.Sparameters.phaseS11M, mwfiltersgui.SensitivityAnalysis.phaseS11M, libcommonfunc.Sparameters.phaseS21M, mwfiltersgui.SensitivityAnalysis.phaseS21M, libcommonfunc.Sparameters.phaseS22M, mwfiltersgui.SensitivityAnalysis.phaseS22M, mwfiltersgui.SensitivityAnalysis.plotSensitivity(), mwfiltersgui.SensitivityAnalysis.randomVariations(), libcommonfunc.Sparameters.S11M, mwfiltersgui.SensitivityAnalysis.S11M, libcommonfunc.Sparameters.S21M, mwfiltersgui.SensitivityAnalysis.S21M, libcommonfunc.Sparameters.S22M, and mwfiltersgui.SensitivityAnalysis.S22M.

Here is the call graph for this function:


The documentation for this class was generated from the following file: