# ureal

Uncertain real parameter

## Description

Use the `ureal`

uncertain element to represent real numbers whose
values are uncertain when modeling dynamic systems with uncertainty. An uncertain real
parameter has a nominal value, stored in the `NominalValue`

property, and an
uncertainty, which is the potential deviation from the nominal value. `ureal`

stores this deviation equivalently in three different properties:

`PlusMinus`

— The additive relative deviation from`NominalValue`

`Range`

— The absolute range of values, expressed as an interval containing`NominalValue`

`Percentage`

— The deviation, expressed as a percentage of`NominalValue`

When you create an uncertain real parameter, you can specify the uncertainty in any of
these three ways. The `ureal`

object automatically calculates the appropriate
values for the other two properties.

You can combine `ureal`

uncertain parameters with numeric parameters to
create uncertain matrices (`umat`

objects) which you can then use to create
uncertain state-space models. Or, you can use them as coefficients in transfer functions. When
you use uncertain real parameters to build uncertain dynamic systems, the result is an
uncertain model such as a `uss`

or `genss`

model.

## Creation

### Syntax

### Description

`p = ureal(`

creates an uncertain real parameter with the specified nominal value and an uncertainty of
±1. This syntax sets the `name`

,`nominalvalue`

)`Name`

and `NominalValue`

properties of the resulting `ureal`

object.

`p = ureal(`

sets the uncertainty to the specified deviations from the nominal value.
`name`

,`nominalvalue`

,'PlusMinus',`plusminus`

)`plusminus`

is a two-element vector of the form
`[-DL,DR]`

. The uncertain parameter takes values in the range
`[nominalvalue-DL,nominalvalue+DR]`

. If the range is symmetric around
the nominal value such that `DL = DR`

, you can use
`plusminus`

` = DR`

.

Using this syntax also sets the `Mode`

property of the resulting
`ureal`

object to `'PlusMinus'`

.

`p = ureal(`

sets the uncertainty to the specified absolute range. `name`

,`nominalvalue`

,'Range',`range`

)`range`

is a
two-element vector of the form `[LOW,HIGH]`

, and the nominal value must
fall in this range.

Using this syntax also sets the `Mode`

property of the resulting
`ureal`

object to `'Range'`

.

`p = ureal(`

sets the uncertainty in terms of percentage deviations from the nominal value.
`name`

,`nominalvalue`

,'Percentage',`percentage`

)`percentage`

is a two-element vector of the form
`[-PL,PR]`

. This syntax sets the lower and upper limits of the
uncertainty range such that `PL = 100*|1-LOW/nominalvalue|`

and
`PR = 100*|1-HIGH/nominalvalue|`

.

Using this syntax also sets the `Mode`

property of the resulting
`ureal`

object to `'Percentage'`

.

`p = ureal(`

sets additional properties using name-value pairs. You can specify multiple name-value
pairs. Enclose each property name in single quotes.`name`

,`nominalvalue`

,___,`Name,Value`

)

## Properties

## Object Functions

You can use `ureal`

parameters with functions for creating dynamic systems
such as `tf`

and `ss`

. You can also combine them with
existing dynamic systems models using model arithmetic or commands such as
`feedback`

. Doing so creates an uncertain state-space model. You can also
combine `ureal`

parameters using common arithmetic operations, which generally
results in an uncertain matrix (`umat`

object). Use functions such as
`actual2normalized`

and `uscale`

to transform or scale
the amount of uncertainty in a `ureal`

parameter. You can also use commands
such as `usample`

or `usubs`

to replace real parameters
with fixed values. The `gridureal`

command evaluates a
`ureal`

parameter over its range and returns a grid of sampled values.

The following list contains a representative subset of the functions you can use with
`ureal`

parameter objects.

`actual2normalized` | Transform actual values to normalized values |

`append` | Group models by appending their inputs and outputs |

`feedback` | Feedback connection of multiple models |

`get` | Access model property values |

`getLimits` | Validity range for uncertain real (`ureal` )
parameters |

`getNominal` | Nominal value of uncertain model |

`gridureal` | Grid `ureal` parameters uniformly over their range |

`isuncertain` | Check whether argument is uncertain class type |

`normalized2actual` | Convert value for atom in normalized coordinates to corresponding actual value |

`replaceBlock` | Replace or update control design blocks in generalized LTI model |

`rsampleBlock` | Randomly sample Control Design blocks in generalized model |

`sampleBlock` | Sample Control Design blocks in generalized model |

`ss` | State-space model |

`tf` | Transfer function model |

`umat` | Create uncertain matrix |

`usample` | Generate random samples of uncertain or generalized model |

`uscale` | Scale uncertainty of block or system |

`usubs` | Substitute given values for uncertain elements of uncertain objects |

## Examples

## Tips

`ureal`

objects support uncertainty that is skewed, or asymmetric around the nominal value. However, highly skewed ranges can lead to poor numeric conditioning and poor results. Therefore, for meaningful results, avoid highly skewed ranges where the nominal value is orders of magnitude closer to one end of the range than to the other.When the uncertainty range of a

`ureal`

parameter is not centered at its nominal value, the parameter can take only a restricted range of values. For robust stability analysis, which sometimes requires assigning a parameter values outside the specified range, these restrictions mean that the smallest destabilizing perturbation of the parameter might be outside the actual range of values that the parameter can take. Use`getLimits`

to find the restricted range of values that a skewed`ureal`

parameter can take. For more information, see`getLimits`

.

## Version History

**Introduced before R2006a**