Main Content

timeresp

Time response for rational object andrationalfitfunction 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

Time varying input signal, specified as a real finite vector.

Data Types:double

配给al function object, specified as arationalfitobject.

Data Types:double
Complex Number Support:Yes

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

Data Types:double

Output Arguments

collapse all

Time varying output signal, returned as a real finite vector.

Data Types:double

Sample time of the output signal, returned as a nonnegative vector of time values with discrete step sizetscorresponding to the data inoutputsignalin seconds.

Data Types:double

More About

collapse all

输出信号方程

timerespfunction uses the variant of the following equation to calculate the output signal:

Y ( n ) = s u m ( C . * X ( n D e l a y / t s ) ) + D * U ( n D e l a y / t s )

where,

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

A— complex vector of poles of the rational function

C—complex vector of residues of the rational function

D—scalar value specifying direct feedthrough, and

Delay— delay time are properties of the rational function object,h. For more information, seerationalfitfunction.

Version History

Introduced in R2007a