Week 8 - GSoC '21

Major highlights of this week-

  1. PR #21703 got merged!! This PR was long overdue and was also crucial for the foundation of the control module in the later stages of development. There have been a few significant changes in the structure of the Series and Parallel classes from when I discussed it last time (Week 5 & 6 blogpost). To list a few -

    1. Both Series and Parallel classes are now divided into two classes, viz. Series and MIMOSeries along with Parallel and MIMOParallel. This is done to structure the project better. It will help the user (with better API) and the future contributors (better structure = easy debugging). Earlier, we were planning to go with SISOSeries/SISOParallel and MIMOSeries/MIMOParallel naming convention (for consistency), but since Series and Parallel classes have already been there in the past two releases, we decided to keep them as it is for backward compatibility.
    2. LinearTimeInvariant class, introduced in Week-6, now acts as a superclass for SISOLinearTimeInvariant and MIMOLinearTimeInvariant classes. As the name suggests, MIMO classes (like TransferFunctionMatrix, MIMOSeries, and MIMOParallel) are subclasses of MIMOLinearTimeInvariant and SISO classes (like TransferFunction, Series and Parallel) are subclasses of SISOLinearTimeInvariant.
    3. In some cases, the doit() method in Series and MIMOSeries classes could cancel poles and zeros in the equivalent TransferFunction objects. This vulnerability was pointed out by @oscarbenjamin, and it is now fixed.
    4. Flattening of args is now done at the time of object creation for Series (SISO) and Parallel (MIMO and SISO) classes. Earlier it was only implemented for __mul__ (in Series), and __add__ (in Parallel), respectively.
    5. I introduced a decorator to reduce redundant code for checking the type of object for various mathematical operations.
  2. Added evalf(), simplify() and expand() methods in TransferFunctionMatrix class.

Apart from these significant highlights, I am also worked on the plots PR (#21763) this week. There are many performance/API accessibility constraints that I have to fulfill before this could be merged.