2
$\begingroup$

I am working on a python based LTSPICE project.

I would like to get poles and zeros of AC simulation data. Is there a way to get them under use of the magnitude and phase out of the frequency response of my system?

enter image description here

$\endgroup$
7
  • $\begingroup$ What have you done so far? $\endgroup$ Nov 11, 2019 at 15:42
  • $\begingroup$ I have a automation that calculates stability under use of the minor loop gain criterion and now I would like to check if I could already implement the fulfilment of the passivity criterion which has two conditions: 1: Is the phase in the area between +-90° respectively the amplitude always positive and 2: Do the tf poles all lie in the LHP (left half plane) so I therefore need the pole positions $\endgroup$
    – Andre
    Nov 11, 2019 at 16:22
  • $\begingroup$ The frequency response data (f and the route in dB and phase in degree) are stored in a pandas dataframe. $\endgroup$
    – Andre
    Nov 11, 2019 at 16:26
  • $\begingroup$ Would the answers to this question be helpful? $\endgroup$
    – Matt L.
    Nov 11, 2019 at 19:07
  • $\begingroup$ @Matt L. Yes that describes my Problem. But is there already a Python or Matlab implementation that fits to this procedure? $\endgroup$
    – Andre
    Nov 11, 2019 at 21:55

1 Answer 1

1
$\begingroup$

This is a very complicated problems and I don't think there exists a one-size-fits-all solution. You can try Matlab's $invfreqz()$ and see if it works for your purposes https://www.mathworks.com/help/signal/ref/invfreqz.html

In general this is a error minimization problem but the actual data and the way you set the your error function and the search strategy makes a huge difference in the outcome. Things to watch out for

  1. How good is your data? What's the frequency coverage range, density and shape of frequency grid, signal to noise ratio, etc.
  2. What do you care about in the result. Dips vs peaks ? Phase vs amplitude, ?
  3. Stability and causality constraints. How do you deal with non-causalities in the data (real or noise induced)
  4. Search space representation, search strategy & algorithms.
  5. Error surface shaping and optimization.
  6. Convergence tracking, stop criteria, metrics for success (or lack thereof)

I developed one of these that is optimized around the specific constraints and requirements of my application and found invfreqz() to be totally useless. Your mileage may vary.

$\endgroup$
1
  • $\begingroup$ Thank you very much for your answer Hilmar. I will try the invfreqs function similar to the infvfreqz function you mentioned. The reason why i need the tf are very easy to explain. My purpose is to get poles and zeros to measure wheather there are some of them in the right half plane. And because of that i thought it would be easy by calculating when the denominator will be zero. $\endgroup$
    – Andre
    Nov 15, 2019 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.