Previously I had the following coefficients in the program. In this program I want to create a transfer function of butterworth approximation (Digital Filter Design - Digital Signal Processing).
import control as ct import numpy as np# Coefficientsb1_0 = 0.906197420861457b1_1 = 2.1877541036312493b2_0 = 1.401865445882832b2_1 = 1.4018654458828321# Numeratornumerator = [b2_0 * b2_1]# Denominatorden1 = [1, b2_0, b1_0] # Denominator 1den2 = [1, b2_1, b1_1] # Denominator 2# Convolve the two denominators to get the final denominatorfinal_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 with format 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?