Help - How to separate 4th order transfer function (Butterworth Approximation) into 2nd order using Python Control Library?

11 Views Asked by At

Previously I had the following coefficients in the program. In this program I want to create a transfer function of butterworth approximation (Figital Filter Fesign - Digital Signal Processing).

        import control as ct 
        import numpy as np

        # Coefficients
        b1_0 = 0.906197420861457
        b1_1 = 2.1877541036312493
        b2_0 = 1.401865445882832
        b2_1 = 1.4018654458828321

        # Numerator
        numerator = [b2_0 * b2_1]

        # Denominator
        den1 = [1, b2_0, b1_0] # Denominator 1
        den2 = [1, b2_1, b1_1] # Denominator 2

        # Convolve the two denominators to get the final denominator
        final_den = np.convolve(den1, den2)

        # Create the transfer function.
        tf = ct.tf(numerator, final_den)
        print("\nH_B4(S) = ", tf)

Here is the output of my program:

$$H_{B,4}(s) = \frac{1.965}{S^{4}+2.804S^{3}+5.059S^{2}+4.337S+1.983}$$

The end goal is that I want to create a transfer function like this.

$$H_{B,4}(s) = \frac{\Pi_{m} B_{2m}}{\Pi_{m}(S^2 + B_{1m}S + B_{2m})}$$

$$H_{B,4}(s) = \frac{B_{2,0}B_{2,1}}{(S^2 + B_{1,0}S + B_{2,0})(S^2 + B_{1,1}S + B_{2,1})}$$

$$H_{B,4}(s) = \frac{(1.4019)(1.4019)}{(S^2 + 0.9062S + 1.4019)(S^2 + 2.1878S + 1.4019)}$$

However, with my code, the results are always multiplied and cannot match the goal.

Does anyone have a solution to my problem?

Thank you