# simulateRandom

simulate random trajectories of a nonlinear system controlled with a terminal region controller

## Contents

- Syntax
- Description
- Input Arguments
- Output Arguments
- See Also

## Syntax

[res,t,x,u] = simulateRandom(obj,tFinal)
[res,t,x,u] = simulateRandom(obj,tFinal,Npoints,fracVert,fracDistVert,distChanges)

## Description

Simulate a trajectories of a nonlinear closed-loop system controlled with a terminal region controller corresponding to a terminal region computed with the subpaving algorithm for random initial points inside the terminal region and randomly drawn disturbance values.

## Input Arguments

obj | object of class termRegSubpaving storing the control law computed for the terminal region controller.
tFinal | final time for the simulation
Npoints | number of initial points for which trajectories are simulated
fracVert | fraction of random initial points corresponding to vertices of the initial set (value in [0,1])
fracDistVert | fraction of random disturbance values corresponding to vertices of the disturbance set (value in [0,1])
distChanges | number of changes of the disturbance values during one time step of the algorithm (integer > 0)

## Output Arguments

res | results object storing the simulation data
t | cell-array storing the vectors with the time points for all simulated trajectories
x | cell-array storing the matrices with all simulated trajectories
u | cell-array storing the applied control inputs for all simulated trajectories

## See Also

`compTermRegSubpaving`, `termRegSubpaving`, `simulate`

© 2018-2023 I6 Technische Universität München `•` Website `•` License