Main Content

timeresp

Time response for rational object and rationalfit function object

Description

example

[outputsignal,t] = timeresp(h,inputsignal,ts) computes the output signal that the rational function object produces in response to a give input signal at the specified sample time, ts.

Examples

collapse all

Define the input signal.

SampleTime = 2e-11;
OverSamplingFactor = 25;
TotalSampleNumber = 2^12;
InputSignal = sign(randn(1, ...
              ceil(TotalSampleNumber/OverSamplingFactor)));
InputSignal = repmat(InputSignal, [OverSamplingFactor, 1]);
InputSignal = InputSignal(:);

Create a rational function object.

S = sparameters('default.s2p');
s21 = rfparam(S,2,1);
datafreq = S.Frequencies;
fit_data = rationalfit(datafreq,s21,'Tolerance',-32);

Compute the time response.

[y,t]=timeresp(fit_data,InputSignal,SampleTime);

Input Arguments

collapse all

Input signal,

Example:

Data Types: double
Complex Number Support: Yes

Rational function object, specified as a rationalfit object handle.

Example:

Data Types: double
Complex Number Support: Yes

Sample time of the input signal, specified as a positive scalar integer in seconds.

Example:

Data Types: double

Output Arguments

collapse all

Output signal,

Example:

Data Types: double
Complex Number Support: Yes

Sample time of the output signal, returned as a positive scalar integer in seconds.

Example:

Data Types: double

More About

collapse all

Output Signal Equation

RF Toolbox™ uses the following equation to calculate the output signal:

Y(n)=sum(C.*X(nDelay/ts))+D*U(nDelay/ts)

where,

X(n+1)=F*X(n)+G*U(n)X(1)=0F=exp(A*ts)G=(F1)./A

and A, C, D, and Delay are properties of the rational function object, h.

Introduced in R2007a