Week 12

I can see the finale …. Hello everyone, hope this blog finds you well.

As I have completed 3 weeks of phase 3, I feel I have reached at the climax of this project. As I mentioned in my punchline I can definitely see this project moving towards completion. From now I have 3 weeks remaining in Google Summer Of Code’23. Implementation of the State Space Model is finished and awaiting reviews. This week I did not have too much on my plate, I focused on improving the visual representation of the class.

Aim :

This week I made some comments towards the State Space model. It can be viewed here.

I pushed the Implementation of the Nyquist Plot. It can be viewed here. This became possible after I got in touch with @Davide-sd.
He has been working on the refactoring the existing plotting module along with adding new functions to it. He has provided a roadmap which will eliminate a major blocker, the dependency on matplotlib scatter plot that has stalled pull requests related to the control plots.

I also opened up an issue - Feature Request : Support for Arrows in Sympy’s plotting module. I need them to show the trajectory of the plots.

Work : Let us go through the Pull Requests in brief.

  1. Representations :

    Default representations:

     >>> from sympy import *
     >>> from sympy.physics.control import *
     >>> ss3 = StateSpace(Matrix([[-1.5, -2], [1, 0]]),
     ...                     Matrix([[0.5, 0], [0, 1]]),
     ...                     Matrix([[0, 1], [0, 2]]),
     ...                     Matrix([[2, 2], [1, 1]]))
        
     >>> ss3               # Will look better if each matrix starts at a new line.
     StateSpace(Matrix([
     [-1.5, -2],
     [   1,  0]]), Matrix([
     [0.5, 0],
     [  0, 1]]), Matrix([
     [0, 1],
     [0, 2]]), Matrix([
     [2, 2],
     [1, 1]]))
        
     >>> pprint(ss3)      # Will look better if each matrix is separately pretty printed inside a block representation. 
      StateSpace(Matrix([
          [-1.5, -2],
     [   1,  0]]), Matrix([
           [0.5, 0],
      [  0, 1]]), Matrix([
            [0, 1],
       [0, 2]]), Matrix([
            [2, 2],
           [1, 1]]))
    

    My diff implements the suggestions in the comments:

     >>> ss3
     StateSpace(
     Matrix([
     [-1.5, -2],
     [   1,  0]]),
        
     Matrix([
     [0.5, 0],
     [  0, 1]]),
        
     Matrix([
     [0, 1],
     [0, 2]]),
        
     Matrix([
     [2, 2],
     [1, 1]]))
        
     >>> pprint(ss3)
        
     ⎡⎡-1.5  -2⎤  ⎡0.5  0⎤⎤
     ⎢⎢        ⎥  ⎢      ⎥⎥
     ⎢⎣ 1    0 ⎦  ⎣ 0   1⎦⎥
     ⎢                   ⎥
     ⎢  ⎡0  1⎤     ⎡2  2⎤ ⎥
     ⎢  ⎢    ⎥     ⎢    ⎥ ⎥
     ⎣  ⎣0  2⎦     ⎣1  1⎦ ⎦
    

    Future Work : Now, thorough reviews and design discussions for this pull request will be done.
    After that the last major pull request of my GSOC project, evaluating the State Space Model will be remaining.

Address

Mumbai, Maharashtra, India