0

I have a stream of data (sin, cos) coming into a limited resource FPGA. By limited I mean I cannot afford to instantiate a massive block-ram to store an entire cycle of Sin and Cos data.

This data IF plotted forms an ellipse (this can see this via x,y plotting with a scope). What needs to be determined is "a" and "b" (and also h,k) of the standard ellipse equation.

is it possible to iterate over this incoming data and determine the key parameters of the ellipse?

Naib
  • 999
  • 7
  • 20
  • is it always an ellipse or any form of Chebyshev diagram (Lissajous curve if closed)? because in that case ellipse equations are useless – Spektre Jul 18 '14 at 09:21
  • this is what I mean: http://en.wikipedia.org/wiki/Lissajous_curve – Spektre Jul 18 '14 at 09:27

2 Answers2

1

Since you asked for a, b, h, and k, I'm assuming that the ellipse is not rotated, but might be translated from the origin. I'm further assuming that (sin, cos) are measurements of the sin and cos values that can be converted to (x, y) coordinates.

If this is the case, then the extreme values of sin and cos should correspond to points on the axes of the ellipse. You should be able to iterate through the points, looking for where the values change direction, and storing those values. That should result in four (sin, cos) pairs.

From those, you should be able to convert to (x, y) coordinates which hopefully form horizontal and vertical axes. You should be able to calculate a and b as half the length of those axes, and (h, k) as the intersection of those axes.

If you need a more generalized solution, you might look at this question and this question on Math.StackExchange.

Community
  • 1
  • 1
pmcoltrane
  • 3,052
  • 1
  • 24
  • 30
  • Apologies, there might be a rotation theta to the ellipse but the actual figure isn't needed later on (yes it is required to determined a,b.... – Naib Jul 17 '14 at 19:01
  • That complicates things. An ellipse can be uniquely described by five distinct points on the ellipse. If your measurement error is small, you should be able to use the general equation for conic sections to work out an equation for the ellipse. More math than I can do off the top of my head, but a search should turn up a worked solution. We can calculate planetary orbits, after all... – pmcoltrane Jul 17 '14 at 19:21
0

looking for this? http://www.algebra.com/algebra/homework/Quadratic-relations-and-conic-sections/Quadratic-relations-and-conic-sections.faq.question.480300.html

only 2 points are enough for you to find the "a" and "b"

Wagner Patriota
  • 5,494
  • 26
  • 49