Regarding reviewing of proposal in physics.control

168 views
Skip to first unread message

ABHISHEK KUMAR

unread,
Mar 26, 2024, 6:34:48 PM3/26/24
to sympy
Hi,

I'm Abhishek, and I'm currently a third-year student at NIT Delhi. I'm eager to participate in the upcoming GSoC 2024. Due to my examinations, I couldn't contribute for about three weeks. Now, I'm keen to work on the control system module of SymPy. I've included a link to my draft proposal below. While it's not perfect, I'm committed to refining it as much as possible.

I kindly request potential mentors Jason and Anurag to review my proposal. Any suggestions or feedback would be greatly appreciated. 

ABHISHEK KUMAR

unread,
Mar 26, 2024, 6:41:24 PM3/26/24
to sy...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/9553738b-f42f-4d9d-99c9-9031c3276c22n%40googlegroups.com.
CST Draft Proposal Abhishek Kumar.pdf

Jason Moore

unread,
Mar 27, 2024, 2:11:25 AM3/27/24
to sy...@googlegroups.com
Hi Abhishek,

The proposal looks good and thorough. My only concern is that the proposed contributions are mostly focused on mimicking behavior from python control or matlab, which are purely numerical. We should focus on adding things to and improving sympy control that leverages symbolics. Please think about each of your proposed features and what they look like from a symbolic perspective and whether you are adding functionality that python control already has or actually bringing some interesting new symbolic features to a user's "control toolbox".

Jason

Message has been deleted

Anurag Surendra Bhat (B20CS097)

unread,
Mar 27, 2024, 3:32:46 AM3/27/24
to sympy
Sorry I pressed post message by mistake. Continuing the reply here - 

Hi Abhishek,
I went over all the ideas and they look well researched to me. Personally, I would prefer if the idea - 
"Add a symbolic solver (and a numeric solver if required) with the help of the existing ODE module to solve x' = Ax + Bu form that to return the symbolic evaluation of the system for input u and known state x0 at time t0" is given greater priority over adding more features, let's say "Adding Laub's and Horner's Methods". We can work to improve what we already have rather than trying to make the Transfer Function class more feature rich.

Regards,
Anurag

On Wednesday, March 27, 2024 at 12:59:45 PM UTC+5:30 Anurag Surendra Bhat (B20CS097) wrote:
Hi Abhishek,
I went over all the ideas and they look well researched to me. Personally, I would prefer if the idea - 
"Add a symbolic solver (and a numeric solver if required) with the help of the existing ODE module to solve x' = Ax + Bu form that to return the symbolic evaluation of the system for input u and known state x0 at time t0" is given greater priority over adding more features, let's say 



ABHISHEK KUMAR

unread,
Mar 28, 2024, 6:00:14 AM3/28/24
to sy...@googlegroups.com
Hi Anurag, Jason
I think using ODE module isn't compulsory in for finding solution of the equation x' = Ax +  Bu , I've tried it by using sympy.solvers.ode.systems.linodesolve but it was giving weird result like this , I don't understand what is Dummy terms here.
image.png
I've another idea to find the solution of this differential equation by using Inverse Laplace Transform and by using it the process becomes more simpler. This approach will be more simple and I think inverse_laplace can be used in many places inside of control.

The final solution in this case for a Forced response with input will be
x(t) = inv_laplace([SI - A]**-1)X(0) + inv_laplace([SI-A]**-1 * B * U(S))

X(0) is the initial response it can be also denoted as X(t_0) here.

Here we just need to find the inverse of SI - A once and put it where ever needed.

image.png

ABHISHEK KUMAR

unread,
Mar 28, 2024, 6:22:28 AM3/28/24
to sy...@googlegroups.com
This method is also available in this lecture slide https://www.collegesidekick.com/study-docs/4719732
It also has examples for this method.

Jason Moore

unread,
Mar 28, 2024, 6:47:17 AM3/28/24
to sy...@googlegroups.com
The ode module should solve x' = A*x + B*u. If it doesn't then the best approach would be to fix it there instead of introducing duplicate solving code in control. Always try to use the existing functionality instead of reinventing the wheel.

Jason

Anurag Surendra Bhat (B20CS097)

unread,
Mar 28, 2024, 9:57:20 AM3/28/24
to sy...@googlegroups.com
Hi Abhishek,
I agree with Jason here. You should try to find an elegant solution using the existing ODE module. 
I had researched if the ODE module would be able to solve given differential equation, while writing my proposal last year. So I would suggest you to look into it.

Regards,
Anurag Bhat.


ABHISHEK KUMAR

unread,
Mar 30, 2024, 4:14:20 PM3/30/24
to sy...@googlegroups.com
Hi Jason, Anurag,
I've added the calculation of the state vector and output vector by using the ODE module and a function to calculate the bandwidth of the TransferFunction using the sympy solve function.


SymPy Proposal 2024 Control Systems Abhishek.pdf
Reply all
Reply to author
Forward
0 new messages