GSoC 2023 Application Baiyuan Qiu: Extensions of Symbolic Control Systems (sympy.physics.control) - sympy/sympy GitHub Wiki

Extensions of Symbolic Control Systems (sympy.physics.control)

Control Systems subpackage (sympy.physics.control) was added to SymPy in the summer of 2020, by Naman Gera. A bunch of basic classed was created, such as TransferFunction, Series, Parallel, and Feedback. But more work needs to be done to expand the functionality of this subpackage's functionality.

Me the person

Full name: Baiyuan Qiu

University: National University of Singapore

Short bio:

I graduated from the University of Electronic Science and Technology, majoring in Communication Engineering during my undergraduate studies. Therefore, I have taken courses such as "Signals and Systems" and "Digital Signal Processing." Currently, I am studying Industry 4.0-related courses at the National University of Singapore, focusing on machine learning and data analysis. I have a wide range of hobbies, sometimes driven purely by whim. For instance, I have developed a 2D shooting game and a platform jumper game using the Godot Engine and have self-taught guitar and piano. This is also why I chose the username "ColourfulWhite" - I want my life to be colourful yet maintain a pure and unwavering white essence.

Contact info:

  • Email: [email protected], [email protected]
  • GitHub username: bugmaker2
  • Other username: bugmaker (in code-related platforms if it is not occupied), ColourfulWhite (in non-code-related platforms)
  • Personal page: Baiyuan Qiu (haven't updated for a long time)
  • Time zone: UTC+8
  • Other: I am using Habitica to track my dailies, you can find me by searching @ColourfulWhite

Me the programmer

Platform: MacOS, Linux (cloud server)

Editor: VSCode with necessary plugins.

Experience in coding:

  • Basic: Java, C++, Bash.
  • Intermediate: Python, Matlab.

Coding experience in general

I learned C++ for algorithm competition in high school but didn't continue to compete in ACM at university. I kept using Matlab as my courses mainly based on it. I learned Java because it is more easier to understand the concept of OOP using Java.

I taught myself Python during my second year of university. I controlled a Raspberry Pi and created an Animal Identification Camera. As I progressed, I found that Python was an easy-to-understand language with many useful libraries.

After completing that project, I learned Flask, a web-app framework, and other data analysis libraries like NumPy, Pandas, and Matplotlib. These libraries were instrumental in helping me analyze data effectively. For my graduation project, I used Scikit-learn and PyQt5 to develop a machine learning model. Mostly I would use Python to create some tiny tools for personal use: Spider to learn English, Simple Diary

I am using PyTorch recently for its excellence in machine learning.

Git

I used git before. But some features like auto test and auto CI are new to me.

Me and my project

I am new to SymPy, actually. Why Sympy?

To be short. I really hate Matlab when I was an undergraduate. It's powerful, but it's too bulky and cumbersome. It took up a big chunk of hard drive space on my cheap computer, and even when I set the installation location to a different hard drive, it added a lot of files to the C drive. Whether I want to start Simulink or just do symbolic computing, I have to wait at least five minutes to start Matlab (my computer was so cheap at that time). I still remember that terrible experience in my life. Although Python was introduced in class at that time, I never thought it could be so powerful to replace Matlab.

After browsing the project list of this year's GSoC, I found my interest in SymPy and Symbolic Control Systems. I feel excited to support this project, I wanna join the Pythonic Knights to fight the Monster Matlab.

So, why I choose Symbolic Control Systems (sympy.physics.control) as my target?

As I mentioned above, I am a bachelor of Communication Engineering. I had courses like Signals and Systems, and Digital Signal Processing. So the concepts like zero-pole, bode, nyquist in the Future work part of the idea attract me immediately. I quickly found that it is the same technique as I learned, although in a physics.control context.

As I am working on Machine Learning recently. The knowledge of TransferFunction, Pole Zero,... are fading away in my memory. I reviewed them these days, and although there still remains much to read, I am able to contribute a little bit now(PR 24984). As I check the table of contents of the reference book Feedback Systems: An Introduction for Scientists and Engineers, the topics are familiar to me.

Another point is that I think this idea is a perfect one-person job to experience open-source workflow from design to implementation, to documentation.

There is obviously some work done by others before:

My work would be based on physics.control, which was introduced into SymPy by Naman Gera during GSoC 2020. The documents below can also support me.

Control System Toolbox in Matlab

Python Control Systems Library

When it comes to the part related to this project, this can be used as a very good reference: TransferFunction in Python Control Systems Library

I can design SymPy classes and functions by referring to the way they have organized the functions. Also see their implementation for further Sympy features

Deliverables

The deliverables with a '#' should be discussed further.

Work time

Because the official start date is May 29th, before that, I can only provide about 10 hours of contribution per week. I will try to finish my pull request #24984 no matter whether I am selected. The schedule will be flexible and adjusted based on the response to community interactions and the intensity of my current academic work.

After the official start, I can get 25 hours per week until mid-June and up to 32 hours per week after mid-June. I think the specific time period needs to be discussed again, because there will be time differences when cooperating with team members, but the amount of time can be determined.

Patch requirement - Also my contribution so far

[WIP] Added sample() and merged existing sampling methods in Control API #24984

Bug and test errors emerged after I added gbt. I am still working on it.

Reference

Formal Proposal - Hasn't been updated yet

Feedback Systems: An Introduction for Scientists and Engineers

[GSoC] Add TransferFunctionMatrix class in physics.control #19761

[GSoC] Tracking tasks for adding control package #19352

[WIP] Added sample() and merged existing sampling methods in Control API #24984