Author Topic: 3D 3-phase Lissajous figure  (Read 1575 times)

0 Members and 1 Guest are viewing this topic.

Offline CirclotronTopic starter

  • Super Contributor
  • ***
  • Posts: 3362
  • Country: au
3D 3-phase Lissajous figure
« on: October 18, 2020, 10:52:13 am »
Just trying to visualise the above. Each phase is equal voltage, sinusoidal, and of course 120 deg apart. My thinking so far is that it would be a circle when viewed from the appropriate angle, and the angle that it would be tilted on would be if the circle was the largest circle that could be fitted inside a given sized cube. Any ideas on this?
« Last Edit: October 18, 2020, 02:02:41 pm by Circlotron »
 

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2321
  • Country: sk
    • My site
Re: 3D 3-phase Lissajous figure
« Reply #1 on: October 18, 2020, 05:07:19 pm »
Sounds reasonable. I brewed up a quick bit of code for Octave/Matlab if anyone wants to play around.
Code: [Select]
clc; clear;

Amps = [1, 1, 1];
Phases = [0, 120, 240];
Freqs = [1, 1, 1];

Npoints = 1000;
TMax = 3;

Time = linspace(0, TMax, Npoints);

Phases = pi * Phases / 180;
Freqs = 2 * pi * Freqs;

TPoints = Phases + (Time' .* Freqs);

Sines = Amps .* sin(TPoints);


X = Sines(:,1);
Y = Sines(:,2);
Z = Sines(:,3);

scatter3(X, Y, Z);

VMax = max(Amps);

axis([-VMax, VMax, -VMax, VMax, -VMax, VMax]);

« Last Edit: October 18, 2020, 09:44:37 pm by daqq »
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9963
  • Country: us
Re: 3D 3-phase Lissajous figure
« Reply #2 on: October 18, 2020, 05:43:02 pm »
I get an operator error at line 15, column 19 (the .+ operator appears to be invalid in this context)

Code: [Select]
TPoints = Phases .+ (Time' .* Freqs);
                 ^^
[/font]
 

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2321
  • Country: sk
    • My site
Re: 3D 3-phase Lissajous figure
« Reply #3 on: October 18, 2020, 06:36:51 pm »
Are you using MATLAB? I'm running it on Octave, works fine. Changing it to just + from .+ still works.
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 

Offline CirclotronTopic starter

  • Super Contributor
  • ***
  • Posts: 3362
  • Country: au
Re: 3D 3-phase Lissajous figure
« Reply #4 on: October 18, 2020, 09:14:36 pm »
Interesting that the plot appears to be 45 deg to both the x and y planes and zero deg to the z plane. I intuitively thought it would be equal angles to all three planes. I have no expertise on these matters.
 

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2321
  • Country: sk
    • My site
Re: 3D 3-phase Lissajous figure
« Reply #5 on: October 18, 2020, 09:42:28 pm »
The actual orientation is kinda tricky to describe and screenshot. I suggest you download Octave and play around with the script, change the frequencies, rotate the graph and so forth. If this is the sort of thing that interests you, a powerful mathematical scripting language is an incredibly valuable tool.
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 
The following users thanked this post: Circlotron

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9963
  • Country: us
Re: 3D 3-phase Lissajous figure
« Reply #6 on: October 19, 2020, 12:16:48 am »
Are you using MATLAB? I'm running it on Octave, works fine. Changing it to just + from .+ still works.

MATLAB...  I had previously made the change and it all worked fine.

The code works as given in Octave.  Just another incompatibility...

If somebody want to see the circle canted in Z, try:

Code: [Select]
Amps = [1, 1, 2];
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7190
  • Country: fi
    • My home page and email address
Re: 3D 3-phase Lissajous figure
« Reply #7 on: October 19, 2020, 04:32:07 am »
It forms a circle of radius \$\sqrt{3/2} \approx 1.224745\$ centered on origin, with a diagonal axis (towards \$(-1,-1,-1)\$).
This is the biggest circle you can fit in a cube with vertices at \$(\pm 1, \pm 1, \pm 1)\$ according to e.g this essay by Maris Ozols.  (Note that Ozol's hypercube had unit length sides, whereas here we have sides of length 2 and \$n = 3\$; and that \$2 \sqrt{3/8} = \sqrt{3/2}\$.)

How can I tell?  I asked Maxima:
Code: [Select]
load("vect") $

"Helper functions:" $
radians(deg) := deg * %pi/180 $
cross(a,b) := express(a ~ b) $

"P(deg) is point 'deg' degrees along the curve." $
P(deg) := [ sin(radians(deg)), sin(radians(deg + 120)), sin(radians(deg + 240)) ] $

"Pick three points along the curve; any three distinct points will do.  Better pick points where sine has a known value." $
p0 : P(0) $
p1 : P(120) $
p2 : P(240) $

"We know the origin is the center by definition.  Find normal." $
n : cross(p1 - p0, p2 - p0) $
ratsimp(n);

"Check the distances of the three points from origin." $
ratsimp([sqrt(p0 . p0), sqrt(p1 . p1), sqrt(p2 . p2)]);
float(%);
If you choose e.g. p0 : P(90) $ p1 : P(180) $ p2 : P(270) $ you get the exact same answer (except for the magnitude of the normal vector, which is irrelevant here, as it depends on the angle p1 p0 p2 ).
« Last Edit: October 19, 2020, 04:44:22 am by Nominal Animal »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9963
  • Country: us
Re: 3D 3-phase Lissajous figure
« Reply #8 on: October 19, 2020, 07:58:29 am »
I'm also a huge fan of Maxima or, actually, wxMaxima - Maxima with a GUI frontend.
College would have been a lot more fun (and easier) if we had these tools back in the early '70s.
 

Offline CirclotronTopic starter

  • Super Contributor
  • ***
  • Posts: 3362
  • Country: au
Re: 3D 3-phase Lissajous figure
« Reply #9 on: October 19, 2020, 10:42:36 am »
This is the biggest circle you can fit in a cube with vertices at \$(\pm 1, \pm 1, \pm 1)\$ according to e.g this essay by Maris Ozols.
Wow! That's great! The maths in that reference makes my head spin. :o I don't even know which way up the page goes. The thing is, the other day I was laying on the couch half dozing and thinking about all this and I suddenly had this strong feeling about the size of the circle. Can't explain it.
 

Offline CirclotronTopic starter

  • Super Contributor
  • ***
  • Posts: 3362
  • Country: au
Re: 3D 3-phase Lissajous figure
« Reply #10 on: October 19, 2020, 11:01:03 am »
Turns out i've been thinking about this problem on and off for sixteen years... For a while I thought the path that would be traced was not circular but more of a twisted 3D figure 8. The seed for the whole thing was this thread six years ago ->
Quote
Suppose we have a cube of magnetic material and we wind some wire around it. Apply a sine wave to the winding and the magnetic field points back and forth along the axis of the winding.

Then we add a second winding at right angles to the first and supply this second winding with a sine wave 90 degrees phase shifted from the first winding. The vector sum of the two resulting magnetic fields would now point back and forth between the axes of the two windings.

Now suppose we add a third winding on our cube at right angles to both previous windings, and we now supply our three windings with three sine waves each shifted 120 degrees as per a normal 3-phase AC power supply.

What path would the resultant magnetic field now follow?
Would this device be of any practical use?


From here -> https://www.eevblog.com/forum/projects/three-phase-magnetic-cube/ 

Looks like I can finally stop loosing sleep over it.
 

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2321
  • Country: sk
    • My site
Re: 3D 3-phase Lissajous figure
« Reply #11 on: October 19, 2020, 11:36:22 am »
For a while I thought the path that would be traced was not circular but more of a twisted 3D figure 8.
I made an animation on the topic. Two sines are of the same frequency, the frequency of the third one is varied, ranging from 1x to 3x of the other two sines. There's a moment and a point of view where you get an 8-ish figure, but you need to play with the mutual phases, sizes, frequencies.
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2321
  • Country: sk
    • My site
Re: 3D 3-phase Lissajous figure
« Reply #12 on: October 19, 2020, 11:37:59 am »
And this also sweeps the phase of one of the sines. This proves nothing, it's only pretty to look at  ;)
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 

Online Nominal Animal

  • Super Contributor
  • ***
  • Posts: 7190
  • Country: fi
    • My home page and email address
Re: 3D 3-phase Lissajous figure
« Reply #13 on: October 19, 2020, 01:01:57 pm »
This is the biggest circle you can fit in a cube with vertices at \$(\pm 1, \pm 1, \pm 1)\$ according to e.g this essay by Maris Ozols.
Wow! That's great! The maths in that reference makes my head spin. :o I don't even know which way up the page goes. The thing is, the other day I was laying on the couch half dozing and thinking about all this and I suddenly had this strong feeling about the size of the circle. Can't explain it.

An easy way would be to consider a cube centered at origin, with edge length 2, and its intersection with a plane through origin.  The cube planes are at \$x = \pm 1\$, \$y = \pm 1\$, and \$z = \pm 1\$.  Then ask yourself, what is the orientation of said plane that maximizes the minimum distance between origin and the surface of the cube (i.e., the minimum distance between origin and the cube planes).  It's obviously the one with normal \$(1, 1, 1)\$ (or equivalently \$(-1, -1, -1)\$).  In any other orientation the minimum distance is smaller.

If you consider a circle with a fixed center, it is just all the points that are at a fixed distance from the center and all on the same plane.  So, choosing the plane normal – remembering that because of cube symmetries, we only need to consider at most the positive octant in 3D – that maximizes the minimum distance between center and the intersection with the cube faces, maximizes the radius/diameter of the circle, too.  And we already know it is when the normal is diagonal to the cube.

The referred essay just extends this concept to any number of dimensions n.
« Last Edit: October 19, 2020, 01:03:55 pm by Nominal Animal »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf