--
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/0dfd01c5-ab44-4624-bdba-9cb76ebc28cbn%40googlegroups.com.
These are the ideas that I have accumulated by observing work done in previous years and checking out other CST frameworks .Implementation of all ideas would take extensive discussions with mentors along with a bunch of new unit tests to check their functioning.
1. Complete pending work from previous years in the control package . Making a well documented module with examples and illustrations was one of Naman’s objectives .It was because people always tend to use softwares with top notch documentation. So PR #22124 will be completed with more examples from documentation of MATLAB and python-control .I also have a course textbook for my control-systems course and can always refer to that for illustrations.I have spotted a bug and raised an issue #23247 .Transfer function should not be able to take non-polynomial expressions as input (eg -sin(x) , 2^(x)).
SymPy being a symbolic library ,subs( ) and rewrite( ) are useful properties. ‘TransferFunction’ is basically a rational function ,so it will be a good addition if users can access these methods. ‘TransferFunction’ inherits ‘Basic’,so this can be done. ‘TransferFunctionMatrix’ also lacks these properties.
Restructuring some parts of the code , I feel some functions are unutilized .Minor functionalities for ‘TransferFunction' that are a part of other CST frameworks like MATLAB can be made a part of SymPy too.
Some of these are -
bandwidth(system) - First frequency where gain drops by -3dB of DC value.
margin(system) - Gives gain-margin and phase-margin which are used to visualize marginal stability that SymPy’s ‘is_stable()’ gives no information about.
Making input ‘var’ in ‘TransferFunction’ optional instead of compulsory. Users will only have to specify the variable when there is a conflict.
Allowing a MATLAB-like input scheme where users just have to input coefficients of particular degrees of the Transfer Function in order.I personally feel it is an efficient method of input and will itself eliminate many input issues, one of them pointed above as use of non-polynomials.
For eg. -
>>Sys = tf([1, 2] ,[1, 2, 3])
>>Sys(s)
(s**2 + 2*s)/(s**2 + 2*s + 3)
Allowing a declared rational expression to be taken as input in ‘TransferFunction’ to reduce size -
For eg. -
# Current
>>> tf1 = TransferFunction(1,1+s,s)
>>> tf2 = TransferFunction(2,2+s,s)
>>> t = TransferFunctionMatrix([[tf1, tf2],[-tf1,-tf2]])
# Proposing to allow
>>> exp1 =1/1+s
>>> exp1 = 1/(1+s)
>>> exp2 = 2/(2+s)
>>> t = TransferFunctionMatrix([[exp1, exp2],[-exp1,-exp2]])
Adding support for ‘TransferFunctionMatrix’ objects to be instantiated by passing a list of numerators and a common denominator. This can be an alternative way of object creation.
is_observable( StateSpaceModel )
observability_matrix( StateSpaceModel )
observable_subspace( StateSpaceModel )