0
$\begingroup$

Using Scipy signal in Python I want to obtain a transfer function for an input which passes first from sys1 and then sys2. So explicitly $$\text{input}{\longrightarrow}\boxed{\tt sys1}{\longrightarrow}\boxed{\tt sys2}{\longrightarrow}\text{output}$$

sys1 = signal.lti([a], [b, c])

sys1 = signal.lti([x], [y, z])

How can I cascade sys1 and sys2 programatically to obtain the overall transfer function (call it sys_total) between the input and output?

$\endgroup$

2 Answers 2

1
$\begingroup$

The numerator and denominator of the total system are respectively the convolution of the numerators and the denominators of the filters to be cascaded.

$$ b(n)=b_1(n)*b_2(n) $$

$$ a(n)=a_1(n)*a_2(n) $$

You can validate it by the following code in MATLAB

b = conv(b1, b2);
a = conv(a1, a2);
sys1 = dfilt.df2t(b1, a1);
sys2 = dfilt.df2t(b2, a2);
sys = cascade(sys1, sys2);
[b, a] = tf(sys); % convert system object to coefficients
$\endgroup$
0
$\begingroup$

Sorry i made a mistake in the first post, here is the correction...

Since we are dealing with LTI system connected in series the global impulse response of you system is equal to the convolution product of both impulse response of each LTI system.

\begin{equation}y_1(t)=x(t)\star \mathrm{Hsys_1}(t)\end{equation} and \begin{equation}y(t)=y_1(t)\star \mathrm{Hsys_2}(t)\end{equation}

the global result would be : \begin{equation}y(t)=x(t)\star\big(\mathrm{Hsys_2}(t)\star \mathrm{Hsys_1}(t)\big)\end{equation} or \begin{equation}y(t)=x(t)\star \big(\mathrm{Hsys_1}(t)\star \mathrm{Hsys_2}(t)\big)\end{equation}

However in presence of a transfert function in the laplace domain, which is your case the global transfert function (in the laplace domain) is :

\begin{equation}Y(s) = X(s)\times{SYS_1(s)}\times{SYS_2(s)}\end{equation}

$\endgroup$
1
  • $\begingroup$ Thank you. How can we obtain sys1∗sys2 i.e convolution product in Python? $\endgroup$
    – cm64
    Commented Nov 26, 2020 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.