cbadc.analog_system.topology.sos2abcd
- cbadc.analog_system.topology.sos2abcd(sos: ndarray) Tuple[ndarray, ndarray, ndarray, ndarray][source]
Transform a series of biquad (second order systems (sos)) filters into their A,B,C,D state space model equivalent.
Specifcally, for a filter with the transfer function
\(\Pi_{\ell = 1}^{L} \frac{b_{\ell,0}s^2 + b_{\ell,1} s + b_{\ell,2}}{s^2 + a_{\ell,1}s + a_{\ell,2}}\)
represented in a sos matrix
\(\text{sos} = \begin{pmatrix} & & \vdots \\ b_{\ell,0}, & b_{\ell,1}, & b_{\ell,2}, & 1, & a_{\ell,1}, & a_{\ell,2} \\ & & \vdots \end{pmatrix}\)
is represented in a controllable canonical state space representation form
\(\begin{pmatrix} \dot{x}_{\ell, 1}(t) \\ \dot{x}_{\ell,2}(t) \end{pmatrix} = \begin{pmatrix}1 , & 0 \\ -a_{\ell,2}, & -a_{\ell,1} \end{pmatrix} \begin{pmatrix} x_{\ell,1}(t) \\ x_{\ell,2}(t)\end{pmatrix} + \begin{pmatrix} 0 \\ 1 \end{pmatrix} u_\ell(t)\)
\(y_\ell(t) = \begin{pmatrix}b_{\ell,2} - b_{\ell,0} * a_{\ell,2}, & b_{\ell,1} - b_{\ell,0}*a_{\ell,1} \end{pmatrix} \begin{pmatrix} x_{\ell,1}(t) \\ x_{\ell,2}(t) \end{pmatrix} + \begin{pmatrix}b_{\ell,0}\end{pmatrix} u_\ell(t)\)
which are then chained together using
cbadc.analog_system.chain().- Parameters
sos (np.ndarray, shape(N, 6)) – biquad equations
- Returns
A (numpy.ndarray, shape=(2 * L, 2 * L)) – a joint state transition matrix.
B (numpy.ndarray, shape=(2 * L, 1)) – a joint input matrix.
C (numpy.ndarray, shape=(1, 2 * L)) – a joint signal observation matrix.
D (numpy.ndarray, shape=(1, 1)) – The direct matrix.