# Computing ~Z-transform~ residues in Julia

Hey

Are there any libraries that compute the Z transform and it’s inverse, implemented in julia? I know of `ControlSystems.jl` for continous systems - can it’s features be applied to discrete systems as well? Is there anything in `DSP.jl` that has to do with z-transformations? I could not find it.

I am thinking of e.g. something analogus to MatLab’s `residue` or `residuez` functions.

It has become clear that this function actually does something like partial fraction decomposition. I am pretty green on the subject, but perhaps pure partial fraction decomposition would do the same thing. That would possibly be implemented in `polynomials.jl`? Or by calling `expand` on some symbolic polynomial-ratio. Any guidance is welcome

PS. My motivation is to keep up with MatLab using only Julia in my DigitalSignalProcessing engineering class It worked out well with `ControlSystems.jl` for another course last semester, but it seems like `DSP.jl` does not have the `residuez` function, which the lecturer said would come in handy.

Controlsystems.jl has discrete time systems as well.
There is no function to calculate residues, but I have one here

4 Likes

See slide 15 and onwards in

There are lots of ways of computing residues, maybe you would find it rewarding to implement one of them with, e.g., SymPy to help you out.

5 Likes

Thanks a lot, really enjoyed the slides.

I have found that symolab and WolframAlpha are easy-to-use tools for partial fraction decomposition, so I think I will be using them mostly. I also liked the third explicit solution formula you showed in the slides, which seems especially good when the numerator is not factorized. Thanks ^-^

1 Like

I’m not sure how to ask this question, both on and off topic, but here it goes.
This topic of Z-transforms is covered in detail in the discrete-time signal processing book bible by Alan Oppenheim of MIT. But gaps like this in the ecosystem seem to suggest that Julia, while coming from MIT, is not yet widely adopted within MIT?

…seem to suggest that Julia, while coming from MIT, is not yet widely adopted within MIT?

Reguarding widespread adoption at MIT, I think someone like @ChrisRackauckas is much better primed to answer than any of us who are involved in this chat.

1 Like

It’s still young. SciML is only starting to enter the control space, and we have major plans.

3 Likes

I have notized I get pretty psyked every time I see you make advancements in your work, weater it be in DifferentialEquations, ModelingToolkit, or my latest favourite Symbolics.

I am currently the only person I know of at my university in Denmark that uses Julia, but with some of the advancements that you seem to be the key person behind, I would bet that more widespread adoption is mostly a question of time for the relevant domains. Thanks for all your work (and others’), and know that it is appreciated

5 Likes