Step-signal response of rational function object
[yout,tout] = stepresp(h, ts, n, trise)
[yout,tout] = stepresp(h, ts, n, trise) calculates
the time-domain response of a rational function object,
to a step signal, defined as:
h is the handle of a rational function
object returned by
rationalfit. The variable ts is
the sample time,
ts; N is the
number of samples,
n; and trise is
trise, that it takes for the step signal
to reach its maximum value. The variable k is an
integer between 0 and N, referring to the index
of the samples.
The following figure illustrates the construction of this signal.
yout is the response of the step
signal at time
Calculate the step response of a rational function object from the file
S = sparameters('passive.s2p'); freq = S.Frequencies;
Get S11 and convert to a TDR transfer function.
s11 = rfparam(S,1,1); Vin = 1; tdrfreqdata = Vin*(s11+1)/2;
Fit to a rational function object.
tdrfit = rationalfit(freq,tdrfreqdata);
Define parameters for a step signal. Define parameters for a step signal
Ts = 1.0e-11; N = 10000; Trise = 1.0e-10;
Calculate the step response for TDR and plot it
[tdr,t1] = stepresp(tdrfit,Ts,N,Trise); figure plot(t1*1e9,tdr) ylabel('TDR') xlabel('Time (ns)')