|
Microwave filters GUI
2.0.3
|
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. | |
Class for sensitivity analysis.
Definition at line 2736 of file mwfiltersgui.py.
| 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.
| def mwfiltersgui.SensitivityAnalysis.plotSensitivity | ( | self | ) |
Plot [S] parameters magnitude and phase graph, if they are available.
The plotted data is self.S11, self.S21 and self.S22, which contain the [S] parameters for all random realizations, in columns.
Definition at line 2959 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, and mwfiltersgui.SensitivityAnalysis.S22M.
Referenced by mwfiltersgui.SensitivityAnalysis.runAnalysis().

| 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.
| 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 . |
| 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 . |
| f0var | = Maximum random variation in % of nominal value, for resonators resonant frequency. |
| Qvar | = Maximum random variation in % of nominal value, for resonators quality factor. |
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
, the quality factor is
where the loss conductance of the unloaded resonator is:
The losses corresponding to the new \form#285 for resonator \form#62 are:
But, after the random variation of resistive couplings the losses that we have are
so, in order to achieve a quality factor
, the modified value of the imaginary part of the diagonal element must be:
Definition at line 2902 of file mwfiltersgui.py.
Referenced by mwfiltersgui.SensitivityAnalysis.runAnalysis().

| 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.
| 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.

1.8.1.2