I need a bit of reverse engineering here, basic one.
I want to design a 4th order filter and indeed I already did it but I don't remember how I did it.
I know that my poles need to be in $p1, p2, p3, p4$ and the filter has to be on the variable $p$ until its fourth derivative.
I have a file in which I fix the poles p1, p2, p3, p4 and then I find the gains associated to each pole with the following formulas:
$k1_f=(p1+p2+p3+p4)\\ k2_f=(p1*p2+p1*p3+p1*p4+p2*p3+p2*p4+p3*p4)\\ k3_f=(p1*p2*p3+p1*p2*p4+p1*p3*p4+p2*p3*p4)\\ k4_f=p1*p2*p3*p4$
I would like your help to understand how I arrived to those results of the gains.
Thanks in advance
The equations that you wrote down are very similar to the coefficients of the product of linear expressions $p+p_i$. This is known as the Theorem of Vieta (normally uses $p-p_i$ as terms). $$P(p)=(p+p_1)(p+p_2)(p+p_3)(p+p_4)=p^4+(p_1+p_2+p_3+p_4)p^3$$ $$+(p_1p_2+p_1p_3+p_1p_4+p_2p_3+p_2p_4+p_3p_4)p^2$$ $$+(p_1p_2p_3+p_1p_2p_4+p_1p_3p_4+p_2p_3p_4)p+p_1p_2p_3p_4$$
Compare this with $P(p)=p^4+k1_fp^3+k2_fp^2+k3_fp+k4_f$ to get your equations.