DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Just for fun - rotating vectors. time and frequency domains

Started by samdavo, October 24, 2014, 03:18:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

samdavo

(copied / moved from another thread - this one more appropriate)

Re Time Domain vs the Frequency Domain  (maybe references to Laplace - and Fourier).

I have prepared this representation of eg a 4-component periodic function (eg components of a vibration).

Warning I am pretty novice at animation mode, but here goes ...

(edit) - easier to open the zipfile with the avi file - which when zipped comes down from 2.5MB to 42kB (?!) - hope I'm right there.
If you :-
a) open the dcd, (shows 4 arrows, initially pointing +X,  on a common Z axle),
b) click on Animation\Animation mode (in menu),
c) Load Animation Template  (you might have to move the Time line if it is covering the menu options)
d) select "arrow rotating"
e) click "play" in the "(Animation) Control Panel"

you should see the yellow arrow rotate about the Z axis.
Hopefully it is about 1Hz. (1 rev per sec, or vice versa).

Now if Y is the real axis, and X is the imaginary, then the component on the Y axis is obviously a sine wave, (1 Hz).

ok, now click stop (black square icon) (edit) in fact probably best to click "animation\animation mode" again to get out of it completely - then load it again ...
f) click Load Animation Template again
g) select "arrows rotating" (plural)
h) click "play" in the "(Animation) Control Panel"

This time you should have 4 arrows rotating, 
* red at about 0.25 Hz,
* yellow at about 0.50 Hz
* green at about 0.75 Hz, and
* cyan at about 1.00 Hz

The length of these arrows varies (=the amplitude at that frequency), and now the COMBINED sum of the projections onto the Y axis gives the compound periodic function.

I'm sure Fourier series is a snack for any electronic experts out there - but personally I found this a pretty interesting way to visualise the various component frequencies - in EITHER time or frequency domain (2 cents). 

samdavo

Further to the above, I find this image on the internet comparing time domain and frequency domain :- ( gee I love the internet :)  )

PS I have amended my example to follow this format (second png attachment)

samdavo

Just another comment, (musical implications),
If those rotating vectors were speeded up (proportionally) so that the first one (red) was spinning at 220Hz, then they would represent
A below middle C, (red) = 220Hz
A an octave up (yellow) = 440 Hz
E above that (green) = 660 Hz  (or E = 659.3 more theoretically correct)
A above that (cyan) = 880 Hz.
(edit) and what the ear would be receiving would be that summated-periodic-vibration !  How good is the ear I ask you, to detect whether those notes are "tuned" and constitute a chord of sorts ! :)

At the end of every rotation of the red vector, all four vectors line up.

Changing Domains to Logarithmic Domain for a minute ...
Another bit of "piano maths", 
Each of the twelve semitones of an octave is approx 1.06 above the last frequency ( actually the twelfth root of 2, namely 1.0594631)

I'm guessing it is an accident of maths, but ...
For any octave, the major chord (eg ACEA) follows the APPROX ratios 1.0, 1.2, 1.5, and 2.0.
eg A = 220 Hz
C = 264 (well actually 261.6)
E = 330  (actually 329.6)
A = 440.

Many of you will recognise this as the casino payout on the odds bets at the craps table for 6/8, 5/9,  and 4/10  :)  (Call that the CRAPS domain, maybe?).

What of the rotating vectors for that major chord?   
For each 10 rotations of the slowest (doh) vector,
there are Approx 12 rotations of the (me) vector,
Approx 15 rotations of the (so) vector, and
20 rotations of the (top doh) vector;
and after these rotations, all the vectors line up. (My theory,ok?, i.e, you can ignore the "Approximations", and close enough is good enough).

If you don't believe me, ask Homer Simpson.  Except that when he sings, the vectors don't quite line up so well.

http://www.youtube.com/watch?v=pURFU3pL93o
The Be Sharps - Baby On Board

samdavo

Quote from: samdavo on October 24, 2014, 02:33:16 PM
Changing Domains to Logarithmic Domain for a minute ...
Another bit of "piano maths", 
Each of the twelve semitones of an octave is approx 1.06 above the last frequency ( actually the twelfth root of 2, namely 1.05946)
(off thread - on a thread that should be in the trivia section anyway, sorry)
Everyone familiar with the rule of 72?

If you invest at 5.946% compound interest (i.e. 1.05946 factor), then after 12 years, you will have doubled your money, (in the same way that 12 semitones make an octave).

Approximation...  6% for 12 years = double, (and 6 x 12 = 72); 
likewise 12% for 6 years, 
or 4% for 18 years  (4 x 18 = 72)
or 18% for 4 years etc
(2 cents)


Back to the piano frequencies for a minute ...
http://en.wikipedia.org/wiki/Piano_key_frequencies
QuoteThis list of frequencies is for a theoretically ideal piano. On an actual piano the ratio between semitones is slightly larger, especially at the high and low ends, where string stiffness causes inharmonicity, i.e., the tendency for the harmonic makeup of each note to run sharp. To compensate for this, octaves are tuned slightly wide, stretched according to the inharmonic characteristics of each instrument. This deviation from equal temperament is called the Railsback curve.
At least that demonstrates that, to the human ear, "close enough is good enough".

PS ever listened to the bagpipes? lol

samdavo

Quote from: samdavo on October 24, 2014, 02:33:16 PM
(edit) and what the ear would be receiving would be that summated-periodic-vibration !  How good is the ear I ask you, to detect whether those notes are "tuned" and constitute a chord of sorts ! :)

At the end of every rotation of the red vector, all four vectors line up.
off thread (still/again)
Actually that's all in the BS Domain when I think about it (and when you consider phase).
i.e. what if two violinists are both playing middle C,  and are exactly half a wavelength /rotation out of phase?    Does that mean you hear nothing (?)

= in reality, a mild case of Doppler I guess (?)

samdavo

https://www.youtube.com/watch?v=yVkdfJ9PkRQ
Pendulum Waves

Something similar to shadows on the floor (if I had added shadows) of those rotating vectors (which was the same principle).   Basically an oscillation with a period of 3 seconds will match one with a period of 4 secs every 12 seconds (and be of opposite phase for the 6 second marks) -  sorry - dead simple of course -  2 cents

Better still this example using pool-table balls, shirts on the left ( 1 - 8 ). singlets on the right ( 9 - 15)
https://www.youtube.com/watch?v=1M8ciWSgc_k  Citadel Physics Wave Pendulum HD

It is a better example because the sine wave seen in plan keeps changing, plus easier to count the wave frequency at each end.

(edit)  I realise many will say that this belongs in the Totally Off Thread section - but still, I used DCAD to scale off the lengths of the various pendulums - just to double check.  :)
and it turns out that the design of such toys is well documented.
http://www.arborsci.com/cool/pendulum-wave-seems-like-magic-but-its-physics

Basically the designs tend to have 15 balls (as these examples do.  The designs are not unique, although the principle is that, in the time the longest takes to oscillate N times, the next one oscillates (N+1), and so on, until the shortest oscillates (N+14) times.
And the period of a pendulum depends on the square root of its length. 

In this case, the longest has 26 cycles in time T, (hence period = T1 = T/26), and length L1 ( = c.T1^2) where c is a constant .
The next has 27 cycles (hence T2 = T/27), and length L2 ( = c.T2^2 = c. (T1 26/27)^2 = L1 (26/27)^2 = 0.93 L1 , ETC
until you get to the 15th ball, which has 26+14 = 40 cycles, and the length is L1 (26/40)^2 = 0.42 L1