Simplifying transfer functions?
See original GitHub issueI have come across a simple example that puzzles me a little.
import control
s = control.TransferFunction.s
G1 = 1 / (1 + 3 * s)**2
G2 = 3 * (1 + 1 / 2 / s)
print(-G2 * control.feedback(G1, G2))
-3 s^2 - 1.5 s
-----------------------------
9 s^4 + 6 s^3 + 4 s^2 + 1.5 s
The absence of automatic factorization and simplification here does not surprise me, but I would expect a function in the toolbox that would perform such an operation. Perhaps a control.simplify, which applied to the transfer function above would return the following function.
-3 s - 1.5
-----------------------------
9 s^3 + 6 s^2 + 4 s + 1.5
Maybe I don’t know where to look, but I have not found such a function.
For the record, sympy allows me to do:
import sympy as sp
s = sp.symbols('s')
G1 = 1 / (1 + 3 * s)**2
G2 = 3 * (1 + 1 / 2 / s)
def feedback(G1, G2, sign=-1):
return G1 / (1 - sign * G1 * G2)
G = -G2 * feedback(G1, G2)
print(G)
print(sp.simplify(G))
print(sp.expand(sp.simplify(G)))
print(sp.simplify(sp.expand(sp.simplify(G))))
(-3 - 1.5/s)/((3*s + 1)**2*((3 + 1.5/s)/(3*s + 1)**2 + 1))
(-3*s - 1.5)/(s*(3*s + 1)**2 + 3*s + 1.5)
-3*s/(9*s**3 + 6*s**2 + 4*s + 1.5) - 1.5/(9*s**3 + 6*s**2 + 4*s + 1.5)
(-3*s - 1.5)/(9*s**3 + 6*s**2 + 4*s + 1.5)
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Transfer function algebra - x-engineer.org
In a parallel connection of transfer functions the same input is fed to all the transfer functions and all the outputs are summed...
Read more >Control Systems - Block Diagram Reduction - Tutorialspoint
Follow these rules for simplifying (reducing) the block diagram, which is having many blocks, summing points and take-off points. ... Note − The...
Read more >How to simplify transfer function? - MATLAB Answers
I have used the function s=tf('s') to ceate a transfer function, but I find that Matlab do not simplify the tf at all....
Read more >Section 5 Block Diagrams.pdf
Often want to simplify block diagrams into simpler, recognizable forms. □ To determine the equivalent transfer function. □ Simplify to instances of the ......
Read more >Finding the Transfer Function and Simplifying it to Standard ...
The answer given by the gentleman before is valid, but factor R2 in the numerator R2(1+sR1C1), then s in the denominator and then...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Floats. Read more about it on Wilkinson’s polynomial
@juanodecc, thanks a lot, I had missed the text
in the documentation of that function. Gives me:
which is quite good.