MMBasic for Windows - betas

Author Message
Regular Member

Joined: 21/01/2022
Location: United States
Posts: 53
Posted: 08:48pm 02 Mar 2022      

I originally tried sending this to Volhout as PM, but that function appears broken. Appears sent, but the TO: name somehow went blank. Forgive if this response is not entirely on-topic.

A sinewave times itself makes for rectified McDonalds arches, but squared in height. Rectification because negative times negative is positive.

Times a squarewave +/-1 of same phase and frequency also makes rectified mmmmmm's, but the gain is unity and not squared in magnitude.

Both the above outcomes have a positive DC component. If the phases oppose, the DC will be negative. If phases offset, the result flips between both signs. DC can be lowpass filtered to measure phase shift.

A sinewave times any other frequency makes a mess that low passes to zilch. Over time, all other frequencies but harmonics will remove themselves from the result. How much you lowpass determines how much mess leaks through, but very narrow lowpass is easy.

I have almost described a homodyne detector or lock-in amplifier. Except they usually work in 90 degree pairs, so to produce a two part vector. Let's do that.

Instead of multiplying sines and integrating over time, lets multiply only by the sign +1/-1 of a squarewave and integrate. Much easier, we only need add or subtract...

Now multiply our sine times a bunch of "sign"waves that differ only in period. Just need an array of countdowns and an array to integrate each result.

The sine*sine method is kinda like RMS, except we havn't yet taken the root of the mean squares. Sine*sign is plain old average. Probably relate just like they would for a multimeter. Vectors might need slight adjustment to account for that cheat.

I am not mathematical and don't know how FFT works. I'm not sure this alternate makes sense or less work. If I were describing the same thing, I would not know.

Edited 2022-03-03 07:10 by KD5ZXG