Categories &

Functions List

Function Reference: ramp

Function File: ramp (sys)
Function File: ramp (sys1, sys2, …, sysN)
Function File: ramp (sys1, 'style1', …, sysN, 'styleN')
Function File: ramp (sys1, …, t)
Function File: ramp (sys1, …, tfinal)
Function File: ramp (sys1, …, tfinal, dt)
Function File: [y, t, x] = ramp (sys)
Function File: [y, t, x] = ramp (sys, t)
Function File: [y, t, x] = ramp (sys, tfinal)
Function File: [y, t, x] = ramp (sys, tfinal, dt)

Ramp response of LTI system. If no output arguments are given, the response is printed on the screen.

Inputs

sys

LTI model.

t

Time vector. Should be evenly spaced. If not specified, it is calculated by the poles of the system to reflect adequately the response transients.

tfinal

Optional simulation horizon. If not specified, it is calculated by the poles of the system to reflect adequately the response transients.

dt

Optional sampling time. Be sure to choose it small enough to capture transient phenomena. If not specified, it is calculated by the poles of the system.

’style’

Line style and color, e.g. ’r’ for a solid red line or ’-.k’ for a dash-dotted black line. See help plot for details.

Outputs

y

Output response array. Has as many rows as time samples (length of t) and as many columns as outputs.

t

Time row vector.

x

State trajectories array. Has length (t) rows and as many columns as states.

See also: impulse, initial, lsim, step

Source Code: ramp

Example: 1

 

 clf;
 s = tf('s');
 g = 1/(2*s^2+3*s+4);
 ramp(g);
 title ("Ramp response of a PT2 transfer function");

                    
plotted figure

Example: 2

 

 clf;
 s = tf('s');
 g = 1/(2*s^2+3*s+4);
 h = c2d(g,0.1);
 ramp(h);
 title ("Ramp response of a discretized PT2 transfer function");

                    
plotted figure