# simulate

simulates a system controlled with a MPC comfort controller

## Contents

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

## Syntax

[t,x,u] = simulate(obj,x0,w,v,Param,iter)

## Description

Simulates the closed-loop system for one time step of the MPC (Model Predictive Control) controller which is used as a comfort controller during online application of the Safety Net Controller.

## Input Arguments

obj | object of class comfContrMPC storing the control law computed in the offline-phase
x0 | initial point for the reachable set computation
w | matrix storing the values for the disturbances over time (dimension: [nw,Nw])
v | matrix storing the measurement errors over time (dimension: [n,Nw])
Param | control parameters computed during reachability analyis
iter | current iteration (=time step) of the Safety Net Controller

## Output Arguments

t | vector storing the time points for the simulated states
x | matrix storing the simulated trajectory (dimension: [`t`,nx])
u | matrix storing the applied control input (dimension: [`t`,nu])

## See Also

`safetyNetControl`, `reachSet`, `comfContrMPC`

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