TimeSeriesSRC.pmodsim¶
- TimeSeriesSRC.pmodsim(pmod, e, u=[])¶
Simulate the output of a prediction model driven by white noise.
Implements the system:
\[y(t) = G(q)\,u(t) + H(q)\,e(t)\]where \(G(q)\) and \(H(q)\) are the transfer functions of the fitted model, and \(e(t)\) is a user-supplied white noise sequence.
- Parameters:
pmod (pmodel) – Fitted or manually constructed prediction model.
e (array-like) – White noise input sequence with the same length as
u.u (array-like, optional) – External input sequence. Required for ARX, ARMAX, BJTF, and regression models. Default
[].
- Returns:
y – Simulated output sequence.
- Return type:
ndarray
Examples
>>> import numpy as np >>> import TimeSeriesSRC as ts >>> pm = ts.pmodel('arma', nc=[1], nd=[1], diff=[0], per=[]) >>> pm.c[0] = np.array([-0.5]) >>> pm.d[0] = np.array([-0.8]) >>> e = np.random.default_rng(0).standard_normal(200) >>> y = ts.pmodsim(pm, e)