Week 3 - GSoC 2020
In the starting days of Week 3, I made further changes in the class level docstrings for
TransferFunction after Jason and Nikhil reviewed the PR.
Jason also mentioned that I had to add a new page in sympy docs which should include the purpose of adding a control package to sympy at a high level.
It must also include some examples to show how this implemented functionality could be used to solve elementary block diagram algebra problems.
But before that could happen, he noticed that
solve() was not working on an
Eq we made after combining transfer functions.
After that, all of us had a really long discussion and finally came to a conclusion that there is a need for adding
Parallel classes, so that we don’t perform these
in-place common operations (addition, subtraction & multiplication).
Now, instead of performing in-place operations like this:
>>> G1 = TransferFunction(s + 3, -s**3 + 9, s) >>> G2 = TransferFunction(s + 1, s - 5, s) >>> G1*G2 TransferFunction((s + 1)*(s + 3), (9 - s**3)*(s - 5), s)
We get this:
>>> G1*G2 Series(TransferFunction(s + 3, -s**3 + 9, s), TransferFunction(s + 1, s - 5, s)) >>> (G1*G2).doit() # reduces the Series or Parallel objects to single combined transfer function TransferFunction(...)
The whole purpose of doing this is to make
solve work by doing block diagram algebra and finally providing us a new transfer function.
Once that is obtained, we can use other functionality on that.
So, in the last few days, I worked on adding a set of unit tests for these classes. Once these unit tests are finalized, I would start with the implementation next week.