Generate simulated input and output time series from a transfer function.
Syntax
[xt,yt] = simtime(pdat,u,numi,denomi,numo,denomo)
[xt,yt] = simtime(pdat,u,numi,denomi,numo,denomo,typ)
Description
simtime generates simulated input and output time series for elis from a transfer function parameter set. The parameters of the transfer function are given in the vector pdat (see exppar, imppar), or in a file if pdat is a string. The excitation time series is given in u. The additive observation noise is generated from white Gaussian noise of variance 1 by the noise shaping filters, defined by numi, denomi and numo, denomo.
The input and output noises are independent. For the generation of correlated noise, the inverse Fourier transform of the outputs of simfou can be used, after having been called with a frequency vector [0:N/2-1]*df.
The resulting time series are returned in xt and yt.
typ chooses between two basic possibilities. If its value is periodic, u is considered as just one period of a periodic excitation, and one period of the steady-state system response is calculated, while the value 'transient' makes simtime produce the transient response, starting from energyless state.
If pdat defines an s-domain model, only steady-state simulation is allowed. In such cases, typ must contain the sampling frequency in Hz.
Default Argument Values
typ = 'periodic'
Examples
f = 400*[1:49];
u = msinprep(f,msinclip(f,[],[],'',0),256,51200);
[xt,yt] = simtime('inpchanz.pbn',u,3e-5,1,3e-5,1);
[xtr,ytr] = simtime('inpchanz.pbn',u,...
3e-5,1,3e-5,1,'transient');
Diagnostics
The leading coefficient of the denominator should not be close to zero (this would approximate a predictor). If a too small leading coefficient is detected (its absolute value is smaller than 10-10 times the largest coefficient), a warning message is sent:
WARNING: the leading coefficient of the denominator is very small in simtime (maxdenom/
denom(1) = ...)
In the transient case, the delay is realized by time shifts. The value must not be negative (this would mean a predictor). If the value of the delay is negative, an error message is sent:
The delay must not be negative (predictor cannot be simulated)
For the time shifting, the value of the delay is rounded to the nearest integer. When the value of the delay is changed, a warning message is sent:
WARNING: the delay has been rounded in simtime
The system defined by pdat must be stable. If this is not true, an error message is sent:
System is not stable
The noise shaping filters must be stable. If the absolute value of any of their poles is larger than 1-10-10, an error message is sent:
Input noise shaping filter is not sufficiently stable
or
Output noise shaping filter is not sufficiently stable
Algorithm
The transient response is calculated via the function filter of MATLAB, the steady-state one by inverse Fourier transform of the frequency domain response.
See Also
simfou
[ Previous | Help Desk | Next ]