Main Content

snr

Taguchi DOE signal-to-noise ratio (SNR)

Since R2025a

    Description

    tbl = snr(dtag,Y) returns a table of signal-to-noise ratio (SNR) information for the Taguchi design of experiments (DOE) object dtag and response data Y. For more information, see taguchiDOE

    example

    tbl = snr(___,Name=Value) specifies additional options using one or more name-value arguments. For example, you can specify the formula to compute the SNR.

    Examples

    collapse all

    Generate a Taguchi L27 design that has 3 three-level factors.

    dtag = taguchiDOE(3,"L27",NumlevelsPerFactor=3)
    dtag = 
      taguchiDOE with properties:
    
                    Design: [27×3 table]
        ModelSpecification: "1 + Factor1 + Factor2 + Factor3"
                    Levels: {[-1 0 1]  [-1 0 1]  [-1 0 1]}
        CategoricalFactors: []
              NoiseFactors: []
                DesignType: "L27"
    
    

    Generate a response value for each run in the taguchiDOE object dtag.

    Y = rand([27,1]);

    Call the snr function to return a table of nominal SNR information for the factors and their individual levels.

    snr(dtag,Y)
    ans=9×5 table
        FactorName    FactorLevel     Mean        Std      nominal_SNR
        __________    ___________    _______    _______    ___________
    
        "Factor1"        "-1"        0.58596    0.34411      10.646   
        "Factor1"        "0"         0.64614    0.34806      12.373   
        "Factor1"        "1"         0.71176    0.27397      19.095   
        "Factor2"        "-1"        0.70534    0.33522      14.878   
        "Factor2"        "0"         0.63388    0.35606      11.535   
        "Factor2"        "1"         0.60465    0.27989      15.405   
        "Factor3"        "-1"        0.61969     0.3668      10.488   
        "Factor3"        "0"         0.63513    0.26054      17.821   
        "Factor3"        "1"         0.68906    0.34368      13.912   
    
    

    Input Arguments

    collapse all

    Taguchi design, specified as a taguchiDOE object.

    Response data, specified as a numeric vector with n elements, where n is the number of rows in dtag.Design.

    Data Types: single | double

    Name-Value Arguments

    collapse all

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: snr(dtag,Y,FactorNames=["A","B"]) specifies to return SNR information for the factors "A" and "B" in the Taguchi design dtag, using the response data Y.

    Factor names, specified as a string array, character vector, or cell array of character vectors. snr returns SNR information for the factors in FactorNames that are factor names in dtag.Design. You cannot specify factor names that are noise factors in dtag. If you do not specify FactorNames, then FactorNames contains all non-noise factors.

    Example: FactorNames=["A","B"]

    Data Types: char | string | cell

    SNR formula, specified as a value in this table.

    ValueDescriptionFormula
    "nominal" (default)Match the response value to a specific target value.10*log(mean(Y)^2/std(Y))
    "smallest"Minimize the response value.-10*log(mean(Y.^2))
    "largest"Maximize the response value.-10*log(mean(1./Y.^2))

    Example: RatioMethod="smallest"

    Data Types: char | string

    Output Arguments

    collapse all

    SNR information, returned as a table with the following columns. The table has a row for each factor and its levels.

    Column NameDescription
    FactorNameFactor name
    FactorLevelFactor level
    MeanMean response value for all points in dtag.Design where the value of FactorName is FactorLevel
    StdStandard deviation of the response value for all points in dtag.Design where the value of FactorName is FactorLevel
    nomimal_SNR (default), smallest_SNR, or largest_SNRSNR value, calculated according to the formula that corresponds to RatioMethod

    References

    [1] Krishnaian, K., and P. Shahabudeen. Applied Design of Experiments and Taguchi Methods. New Delhi: PHI Learning Private Limited, 2012.

    Version History

    Introduced in R2025a