analyze relation between parameters and design requirements
to analyze how the parameters and states (collectively referred to as parameters) of a simulink® model influence the design requirement on the model signals, you first generate samples of the parameters. you then define the cost function by creating a design requirement on the model signals, and evaluate the cost function for each sample. finally, you analyze the relationship between the parameter variations and the cost function values. you can perform this analysis in the following ways:
visual analysis
view a plot of the cost function evaluations against the parameter samples to identify trends. this method is informal and provides visual intuition about how the various parameters affect the cost function.
in the sensitivity analyzer, after the evaluation is complete, an evaluation result
scatter plot is generated in the app. the plot displays the evaluated cost function
value as a function of each parameter in the parameter set. the last column subplot
displays the probability distribution of the evaluated cost function values. you can
add a best-fit line to the scatter subplots by right-clicking in the plot, and
selecting overlay linear fit in the context menu. in this
plot, the best-fit line indicates that the gain
parameter has a
lot of influence on the requirement.
you can also plot a contour plot of the evaluated results. to learn more about these plots, see . for an example, see identify key parameters for estimation (gui).
at the command line, you can use tools such as:
— scatter plot of the parameter samples against the cost function evaluation
, , — 3-d plot of samples of two parameters against the cost function evaluation
for an example, see .
statistical analysis
in addition to visually analyzing the effect of parameters on the cost function, you can also compute statistics to quantify the relation.
obtain summary statistics about the relationship between cost function evaluations and parameters samples. available analysis methods include:
method | description |
---|---|
correlation | use to analyze how a model parameter and the cost function output are correlated. |
partial correlation | use to analyze how a model parameter and the cost function are correlated, removing the effects of the remaining parameters. |
standardized regression | use when you expect that the model parameters linearly influence the cost function. |
for each of these methods, you specify what data to use for the analysis by choosing from the following analysis types:
linear analysis, also referred to as pearson analysis — uses raw data for analysis. use linear analysis when you expect a linear relation between the parameters and cost function, and when the residuals about the best-fit line are expected to be normally distributed. linear analysis is also recommended when the number of samples, and so the number of residual points is large.
ranked analysis, also referred to as spearman analysis and ranked transformation — uses ranks of data for analysis. use ranked analysis when you expect a nonlinear monotonic relation between the parameters and the cost function and when the residuals about the best-fit line are not normally distributed. ranked analysis is also recommended when the number of samples, and so the number of residual points is small.
linear analysis retains information about intervals between data values, whereas ranked analysis does not. suppose that you had the following data set:
x1 x2 y 9 20 340 5 60 106 2.3 50.4 870.5 here x1 and x2 are model parameters, and y is the cost function. each row represents a sample and the associated cost function evaluation.
the data is ranked on a per column basis. for example, when you rank the data in column 1 (x1), which contains the entries 9, 5, and 2.3, the ranked data is equal to 3, 2, and 1. the ranked data set for the samples of x1, x2 and y are as follows:
x1 x2 y 3 1 2 2 3 1 1 2 3 the ranked data set can be used for correlation, partial correlation, or standardized regression analysis.
kendall — kendall’s tau rank correlation coefficient is calculated.
applicable when the analysis method is correlation. requires statistics and machine learning toolbox™ software.
correlation method
calculates the correlation coefficients, r. use this method to analyze how a model parameter and the cost function outputs are correlated.
r is calculated as follows:
x
contains ns samples
of np model parameters. y
contains ns rows,
each row corresponds to the cost function evaluation for a sample
in x
.
r values are in the [-1 1] range. the (i,j) entry of r indicates the correlation between x(i) and y(j).
r(i,j) > 0
— variables have positive correlation. the variables increase together.r(i,j) = 0
— variables have no correlation.r(i,j) < 0
— variables have negative correlation. as one variable increases, the other decreases.
partial correlation method
calculates the partial correlation coefficients, r. this method requires statistics and machine learning toolbox software. use this method to analyze how a model parameter and the cost function are correlated, adjusting to remove the effect of the other parameters.
r is calculated using (statistics and machine learning toolbox) from the statistics and machine learning toolbox software.
standardized regression method
calculates the standardized regression coefficients, r. use this method when you expect that the model parameters linearly influence the cost function.
r is calculated as follows:
consider a single sample (x1,...,xnp) and the corresponding single output, y. bx is the regression coefficient vector calculated using least squares assuming a linear model . r standardizes each element of bx by multiplying it with the ratio of the standard deviation of the corresponding x sample (σx) to the standard deviation of y (σy).
perform statistical analysis
in the sensitivity analyzer, after you have , specify the analysis methods and types in the statistics tab of the app.
select the evaluation results you want to analyze in the evaluation results to analyze list. after that, you specify the analysis methods and types, and click compute statistics. you can compute all applicable combinations of analysis methods and types.
the results of the analysis are returned in the statsresult
variable, in
the results area of the app. in this case, the
statsresult
variable includes the linear (pearson)
correlation coefficients and linear standardized regression coefficients
calculated between the cost function and each parameter. to see the
coefficients, right-click statsresult
, and select
open in the context-menu.
a tornado plot is generated that displays the results of the
analysis in order of influence of parameters on the cost function.
the parameter that most influences the cost function is displayed
on the top. as was seen in the results scatter plot, in this tornado
plot the gain
parameter has the most influence
on the design requirement cost function.
to learn more about tornado plots, see . for an example, see identify key parameters for estimation (gui).
at the command line, specify the analysis methods and types using . this function performs linear correlation analysis by default. to specify other analysis methods, use . for an example, see .
see also
| | |