# .Modelica_LinearSystems2.DiscreteZerosAndPoles.Analysis.rampResponse

## Information

#### Syntax

```(y, t, x)=DiscreteZerosAndPoles.Analysis.rampResponse(ss, tSpan, x0)
```

#### Description

Function rampResponse calculates the time response of a DiscreteZerosAndPoles transfer function for ramp imput u = t. The system is transformed to DiscreteStateSpace state space system and, starting at x(t=0)=0 and y(t=0)=C*x0 + D*u0, the outputs y and x are calculated for each time step t=k*dt.

```DiscreteZerosAndPoles.Analysis.rampResponse(dzp, tSpan)
```

gives the same result as

```DiscreteZerosAndPoles.Analysis.timeResponse(dzp, tSpan, response=Types.TimeResponse.Ramp, x0=fill(0,DiscreteZerosAndPoles.Analysis.denominatorDegree(dzp))).
```

#### Example

```  Modelica_LinearSystems2.DiscreteZerosAndPoles dzp=dzp=1/(q^2 + q + 1)
dzp.Ts=0.1;

Real tSpan= 0.4;

Real y[5,1,1];
Real t[5];
Real x[5,1,1]

algorithm
(y,t,x):=Modelica_LinearSystems2.DiscreteZerosAndPoles.Analysis.rampResponse(dzp,tSpan);
//  y[:,1,1] = {0, 0, 0, 0.1, 0.1}
//         t={0, 0.1, 0.2, 0.3, 0.4}
//  x[:,1,1 = {0, 0, 0, 0.3, 0.3}
```

DiscreteZerosAndPoles.Analysis.timeResponse

#### Interface

```encapsulated function rampResponse
import Modelica;
import Modelica_LinearSystems2;
import Modelica_LinearSystems2.DiscreteZerosAndPoles;
import Modelica_LinearSystems2.DiscreteStateSpace;