octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61355] [octave forge] (control) Error on phas


From: Doug Stewart
Subject: [Octave-bug-tracker] [bug #61355] [octave forge] (control) Error on phase value of bode and margin plots
Date: Sat, 12 Aug 2023 09:45:16 -0400 (EDT)

Follow-up Comment #9, bug #61355 (project octave):

Here Is what I think is the problem.

The original question is about having multiple roots on the imaginary axis. (2
oscillators at the same frequency.) What is happening is:
1) the code does all the math and comes up with a combined math statement.
2) Bode now has to decompose this complex statement back into it individual
roots.
3) Using floating point arithmetic there is round off errors.
4) These round off errors tend to answers that are close to the . but not the
same.
5) since the original roots were right on the imaginary axis then some of the
round off error roots end up in the right hand plane.
6) this can be demonstrated by a=roots(poly ([ 1j 1j 1j 1j 1j ]))
7) all the roots should be 1j but some have a positive real part!
a =

   0.0008 + 0.9995i
  -0.0002 + 0.9990i
   0.0008 + 1.0006i
  -0.0010 + 0.9999i
  -0.0004 + 1.0009i

 One way that I can see to get this fixed is to use more digits etc. and then
round out the errors.
 The second way would be to somehow keep the information used in the original
part of the code and bypass the the complexity of have to fined the roots. But
I don't have any ideas on how this would work.

Juan:
   Your  code does not seem to be this problem so I am not sure if you have
exposed a real bug or not.
 




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61355>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]