4

I am trying to find a function for the following scenario:

enter image description here

Rotating the red arrow will produce a nice sine wave as illustrated to the right of the hexagon. But I need to rotate the blue arrow, and at the same time limit the magnitude according to the hexagon. That means that the magnitude will be 1 at every 60 degrees, and decrease to 0.866 at 60+30 degrees before increasing back to 1.

Something like this: enter image description here

Lastly, i am going to use this varying value in a new sine wave function. That function will look like the dotted curve in the picture below:

enter image description here

But I cannot find the actual function to produce such a curve. (I need it to make a figure about six step operation in electric motor drives)

Hope you can help me

fluxmodel
  • 141
  • Piecewise this looks like $\frac1{\sin x}$ (translated, scaled etc.) – Hagen von Eitzen Jun 18 '15 at 10:29
  • I am not sure if I understand what you mean by that. Plotting 1/(sin (x)) or subtracting it from sin(x) does not make much sense to me – fluxmodel Jun 18 '15 at 10:32
  • A function is defined piece-wise if it takes the value of various different functions on a union of disjoint sets, each of which is the domain of one of those functions. Anyway, could you please clarify what you mean by "rotation" of the "arrows"? – A.P. Jun 18 '15 at 12:11
  • What I mean by "rotation of the arrows" is that a sine wave is an arrow rotating, but at the same time moving along the x-axis. In electrical engineering, this is called a phasor diagram. Meaning that it is usually three arrows 120 degrees appart, and the lenght indicate the magnitude while the angle indicate the position. I have gained more rep now, so i can add some pictures in my original post later today. – fluxmodel Jun 18 '15 at 23:03
  • OK, i think I have it: I need the function for a value which changes from 1 to cos(30) and back to 1, where it starts at 1 at 0 degrees, touches the bottom (cos30) at 30 degrees and returns to 1 again at 60 degrees. This function has to be repetive, and the function should be the amplitude of a sine wave function. – fluxmodel Jun 19 '15 at 00:18
  • You can find the function in my answer... – draks ... Jun 19 '15 at 10:47
  • the function in your answer is not what i am looking for. I will update my original question asap to illustrate more clearly what i am after :) – fluxmodel Jun 20 '15 at 03:28
  • @draks... I have updated my original question to clarify what i am after. Sorry for being unclear. – fluxmodel Jun 20 '15 at 03:58
  • 2
    $$\frac{\cos\left(\frac{\pi}{6}\right)}{ \cos\left(\frac{\pi}{3}\left{\frac{3x}{\pi}\right}-\frac{\pi}{6}\right)} $$ where ${ x } = x - \lfloor x \rfloor$ is the fractional part of $x$. – achille hui Jun 20 '15 at 04:20
  • @achillehui Thank you for commenting. How to I use this in i.e. latex to plot the curve? The function is no problem, but the "where {x} = x-.." is new for me. – fluxmodel Jun 20 '15 at 04:30
  • Look at whatever language you use and see whether there is a "floor" function. ${x}$ can be coded as $x - \text{floor}(x)$. – achille hui Jun 20 '15 at 04:33
  • yeah, the floor function works fine in TikZ. However, I am having a little bit of trouble inserting the function. (this is probably more of a latex issue, i am quite fresh with that language). plot({\x-floor(\x)},{\frac{cos(\frac{pi}{6})}{cos((\frac{pi}{3}\frac{3\x}{pi})-\frac{pi}{6})}}); – fluxmodel Jun 20 '15 at 05:00

2 Answers2

1

One way to approach this is to note that the six sides of the hexagon are straight lines, find the equation of each, then find the intersection of the blue arrow with the correct one. Once you have the angle, you know which side you are interested in. For example, if the angle is between $120^\circ$ and $180^\circ$ you are on the upper left side. If the side of the hexagon is $s$, that line is $y=\frac {\sqrt 3} 2 x -s$ If the angle is $\theta$, you are on the line $y = \tan \theta x$. Solve these together and you get $$x=\frac s{\frac {\sqrt 3}2-\tan \theta}\\y=\frac s{\frac {\sqrt 3}2-\tan \theta}\tan \theta$$

Ross Millikan
  • 374,822
0

I'm not 100% sure if you want this, but when take the complex function $$ \left(1-\left(\sqrt{1-\left(\arcsin\left(\sin\left(6\frac t2\right)\right)/\pi\right)^2}-\frac{\sqrt{3}}2\right)\right)*\exp(it) $$ and plot real against imaginary parts, this looks like a hexagon:

$\hskip1.7in$enter image description here

Click "Compute full result" at W|A...

draks ...
  • 18,449