Sensitivity analysis tools

IQClab also includes tools for performing parametric sensitivity analyses for uncertain LTI systems that are affected by parametric uncertainties. The aim here is to identify driving uncertainties, i.e., identify which uncertainties affect the system’s performance the most and quantify by how much.

Such analyses can be performed with the function

out = sensanalysis(P,meth,N,plotonoff).

Here:

  • P= lft(\Delta,M) is an LFT, which is composed of the stable LTI plant M (continuous or discrete time) and the uncertainty block.
  • \Delta=diag(\delta_1I_{r_1},\cdots,\delta_kI_{r_k}), where the uncertain parameters are objects form the class ureal.
  • meth is for specifying 1 of the 4 available methods (i.e., ‘spea’, ‘src’, ‘morris’, and ‘var’) for performing the sensitivity analysis. These are further discussed below.
  • N specifies the number of samples considered in the analysis.
  • plotonoff=’on’/’off’ is an optional input that allows turning ‘off’ the generation of plots within the function (default is ‘on’ ). By default, the function generates a plot visualizing the computed outcome of the analysis.

Note: In case (some of) the uncertainties are not normalized, then they are normalized internally as \delta_i\in[-1,1] before performing the analysis.

All methods compute the effect of each of the uncertainties in the output for the function y=f(\Delta_j), which is the H_\infty-norm of P for some \Delta_j\in\mathbf{\Delta}, with \mathbf{\Delta} being defined by \delta_{i}\in[\delta_{i}^{-},\delta_{i}^{+}], i=1,\cdots,k.

Spearman rank correlation

The option ‘spea’ computes the Spearman rank correlation \rho_{\delta_i,y} (see e.g., [25]), which is defined as

    \[\rho_{\delta_i,y}=\frac{\Sigma_{j=1}^N(\delta_i^j-\bar{\delta}_i)(y^j-\bar{y})}{\sqrt{\Sigma_{j=1}^N(\delta_i^j-\bar{\delta}_i)^2\cdot \Sigma_{j=1}^N(y^j-\bar{y})^2}}\]

and denotes the rank of the i^{th} input \delta_i in the output y. The superscript j represents the j^{th} sample, while \bar{y} and \bar{\delta}_i denote the mean values taken over the N samples.

The higher the value of \rho_{\delta_i,y}, the more sensitive the system is to the uncertainty \delta_i.

This is a so-called “local” one-at-the-time (OAT) analysis approach, which requires the least amount of computational effort (compared to the other approaches). The other methods can be interpreted as “global” techniques, which also (intend to) address the cross-correlation between the parameters.

As output, one obtains the structure out with the fields:

  • out.rho: This is the vector with the computed sensitivity indices \rho_{\delta_i,y}, i=1,\cdots,k, in descending order (hence the first parameter is identified as the most sensitive one).
  • out.unc: This is the vector with the names of the uncertainties ordered corresponding to the computed sensitivity indices provided in out.rho.

Standard regression coefficients

The option ‘src’ computes the standard regression coefficients (see e.g., [25])

    \[src_i=\frac{b_{i}s_{\delta_i}}{s_y},\]

where, respectively, s_{\delta_i} and s_y are the standard deviations of y and \delta_i, i=1,\cdots,k, while b_i are the regression coefficients of the linear regression model

    \[\hat{y}_j=b_{0} + \Sigma_{i=1}^kb_i\delta_i^j\]

such that \hat{y}_j\approx y_j=f(\Delta_j) for some \Delta_j\in\mathbf{\Delta}.

As output, one obtains the structure out with the fields:

  • out.src: This is the vector with the computed sensitivity indices src_i, i=1,\cdots,k, in descending order (hence the first parameter is identified as the most sensitive one).
  • out.unc: This is the vector with the names of the uncertainties ordered corresponding to the computed sensitivity indices provided in out.src.

Morris method

With the option ‘morris’ the function computes so-called elementary effects [26], [25]. The elementary effect of the i^{th} input is defined as

    \[d_i=\frac{\left(f(\delta_1,\cdots,\delta_{i-1},\delta_{i}+\Theta,\delta_{i+1},\delta_k)\right)}{\Theta}.\]

Here \delta_i takes values from the grid \{0,1/(p-1),2/(p-1),\cdots,1\}, while \Theta is a predetermined multiple of 1/(p-1). Typically, p is chosen to be even and \Theta as \Theta=p/(2(p-1)). After repeating this procedure N times, one can compute the Morris measures of the i^{th} input as

    \[\mu_i^*=\dfrac{\Sigma_{j=1}^N|d_i(j)|}{N}\]

and

    \[\sigma_i=\sqrt{\dfrac{\Sigma_{j=1}^N(d_i(j)-\mu_i)^2}{N}}.\]

Here \mu_i (\mu_i^*) and \sigma_i are the mean (mean of the absolute value) and standard deviation respectively.

The higher the value of \mu_i^*, the more sensitive the output y is to variations in the input \delta_i. On the other hand, the higher the value of \sigma_i, the more interaction \delta_i has with the other inputs.

For economical sampling strategies, Morris [26] proposed the following approach in which p is even and \Theta=p/(2(p-1)) as suggested above. The method consists of selecting the random orientation matrix

    \[B^*=\left(J_{k+1,1}\Delta^*+(\Theta/2)\left((2B-J_{k+1,k})D^*+J_{k+1,k}\right)\right)P^*\]

of B. Here:

  • B is a lower triangular matrix of dimension k+1,k padded with ones,
  • D^* is a k-dimensional diagonal matrix in which each diagonal entry is either -1 or 1 with equal probability,
  • J_{k+1,k} is a k+1 by k all ones matrix and J_{k+1,1} the all ones vector of dimension k+1 by 1,
  • P^* is a random permutation matrix in which each column contains one element being equal to 1, while all other entries are 0,
  • \Delta^* is a randomly chosen ‘base value’ of \Delta\in\mathbf{\Delta} for which each element is randomly assigned a value from the grid \{0,1/(p-1),2/(p-1),\cdots,1-\Theta\}.

As output, one obtains the structure out with the fields:

  • out.mu: This is the vector with the computed sensitivity indices \mu_i, i=1,\cdots,k, in descending order (hence the first parameter is identified as the most sensitive one).
  • out.std: This is the vector with the computed sensitivity indices \sigma_i, i=1,\cdots,k, ordered corresponding to the computed sensitivity indices provided in out.mu.
  • out.unc: This is the vector with the names of the uncertainties ordered corresponding to the computed sensitivity indices provided in out.mu.

Variance-based approach

With the option ‘var’ the function computes the effect of each uncertainty with respect to its induced variance in the output [27]. Given the model y=f(\Delta) the variance-based metrics, the so-called first-order and total effect, are given by

    \[S_i=\frac{V_{\delta_i}\left(E_{\mathbf{\delta}_{\sim i}}(y|\delta_i)\right)}{V(y)}\]

and

    \[S_{Ti}=\frac{V(y)-V_{\mathbf{\delta}_{\sim i}}\left(E_{\delta_{i}}(y|\mathbf{\delta}_{\sim i})\right)}{V(y)}.\]

Here:

  • V_{\delta_i}(\cdot) and E_{\delta_i}(\cdot) denote the variance and mean of the argument taken over \delta_i,
  • V_{\mathbf{\delta}_{\sim i}}(\cdot) and E_{\mathbf{\delta}_{\sim i}}(\cdot) denote the variance and mean of the argument taken over \delta_1,\cdots,\delta_k except for \delta_i.

The indices S_i and S_{Ti} can be interpreted as:

  • V_{\delta_i}\left(E_{\mathbf{\delta}_{\sim i}}(y|\delta_i)\right) is the expected reduction in variance that would be obtained if \delta_i could be fixed,
  • V_{\mathbf{\delta}_{\sim i}}\left(E_{\delta_{i}}(y|\mathbf{\delta}_{\sim i})\right) is the expected variance that would be left if all factors but \delta_i could be fixed.

There are several ways to compute S_i and S_{Ti}. In the present function, they are computed as:

    \[S_i=\frac{V(y)-\frac{1}{2N}\Sigma_{j=1}^N\left(f(\mathbf{B})_j-f(\mathbf{A}_{\mathbf{B}}^{(i)})_j\right)^2}{V(y)}\]

and

    \[S_{Ti}=\frac{\frac{1}{2N}\Sigma_{j=1}^N\left(f(\mathbf{A})_j-f(\mathbf{A}_{\mathbf{B}}^{(i)})_j\right)^2}{V(y)}.\]

Here \mathbf{A}, \mathbf{B} are N by k matrices with samples taken from the set \mathbf{\Delta}; in this function according to a uniform distribution (i.e., other distributions, such as pseudo random distribution, are also possible, but would require the statistics and machine learning toolbox). The matrix \mathbf{A}_{\mathbf{B}}^{(i)} is a composition of the matrix \mathbf{A}, while its i^{th} column is replaced with the corresponding column of \mathbf{B}.

As output, one obtains the structure out with the fields:

  • out.STi: This is the vector with the computed sensitivity indices S_{Ti}, i=1,\cdots,k, in descending order (hence the first parameter is identified as the most sensitive one).
  • out.Si: This is the vector with the computed sensitivity indices S_i, i=1,\cdots,k, ordered corresponding to the computed sensitivity indices provided in out.STi.
  • out.unc: This is the vector with the names of the uncertainties ordered corresponding to the computed sensitivity indices provided in out.STi.

Demonstrating example

A demonstration of this function is found here.

Previous page