Week 7 has been quite exciting. I worked mainly on the plotting features in the control module. I implemented all the plots mentioned in my proposal. After properly writing the documentation, the PR will be ready to merge. Here is a glimpse of all the plots:
-
Pole-Zero Plot
from sympy.abc import s from sympy.physics.control.lti import TransferFunction from sympy.physics.control.plots import pole_zero H_1 = TransferFunction(2*s**2 + 5*s + 1, s**2 + 3*s + 5, s) pole_zero(H_1)
-
Root-Locus Plot
from sympy.abc import s from sympy import I from sympy.physics.control.lti import TransferFunction from sympy.physics.control.plots import root_locus H_1 = TransferFunction((s + 0.2)*(s + 2.5), (s + 1 + 1.4*I)*(s + 1 - 1.4*I), s) root_locus(H_1)
H_2 = TransferFunction(s + 7, s*(s + 5)*(s + 15)*(s + 20), s) root_locus(H_2)
-
Bode Plot
from sympy.abc import s from sympy.physics.control.lti import TransferFunction from sympy.physics.control.plots import bode_plot H_1 = TransferFunction(1*s**2 + 0.1*s + 7.5, 1*s**4 + 0.12*s**3 + 9*s**2, s) bode_plot(H_1)
-
Step-Response
from sympy.abc import s from sympy.physics.control.lti import TransferFunction from sympy.physics.control.plots import step_response H_1 = TransferFunction(8*s**2 + 18*s + 32, 1*s**3 + 6*s**2 + 14*s + 24, s) step_response(H_1)
-
Impulse-Response
from sympy.abc import s from sympy.physics.control.lti import TransferFunction from sympy.physics.control.plots import impulse_response H_1 = TransferFunction(8*s**2 + 18*s + 32, 1*s**3 + 6*s**2 + 14*s + 24, s) impulse_response(H_1)
-
Ramp-Response
from sympy.abc import s from sympy.physics.control.lti import TransferFunction from sympy.physics.control.control_plots import ramp_response H_1 = TransferFunction(s, (s+4)*(s+8), s) ramp_response(H_1, upper_limit=2)
The API is not final, and there will definitely be more changes as the review process goes on. I am delighted that the efforts that I put into these graphs paid off well. After the PR is merged (Hopefully in a couple of days or a little bit more ), you can just copy and paste these code snippets to reproduce the plots.
Apart from these plots, I have been working on the Feedback
class. Adding the support for MIMO systems and tidying the documentation are some of the main things to be done in the class.