GregLocock
Automotive
- Apr 10, 2001
- 23,765
I was generating a sine wave
V1out=sin(2*pi*f*t)
I wanted a sweep, so that the signal from t=1 to t=2 was 1 hz, and the signal from t=20 to t=21 is 20 Hz, etc
V2out=sin(2*pi*int(t)*t)
This gave a nasty discontinuity as the frequency changed at each second mark, so I thought I'd leave int, out.
V3out=sin(2*pi*(t)*t)
Imagine my surprise at the resulting waveform - the frequencies had doubled!
Now I'm sure this is a standard result, and I have been thinking about it for several hours, but I really cannot 'see' why the frequency should double.
Here's a few thoughts
1) sin(2*pi*f*t) goes to zero when f*t goes to zero. If the f phasor is pinning round as fast at the t phasor then the number of zeros will be greater
2) (n+1)^2 -n^2 is the number of zero crossings in the nth second of V3, whereas it is only n(n+1)-n^2 for V2
3) omega=d theta/dt
I've set omega=t*2*pi
so 2*pi*t dt = d theta
hence 1/2 *2*pi*t^2+c =theta
And that half is missing from V3 and is the cause of the frequency doubling
But I am still confused, and cannot see a good explanation why the step from V2 to V3 'needs' the 1/2
Cheers
Greg Locock
V1out=sin(2*pi*f*t)
I wanted a sweep, so that the signal from t=1 to t=2 was 1 hz, and the signal from t=20 to t=21 is 20 Hz, etc
V2out=sin(2*pi*int(t)*t)
This gave a nasty discontinuity as the frequency changed at each second mark, so I thought I'd leave int, out.
V3out=sin(2*pi*(t)*t)
Imagine my surprise at the resulting waveform - the frequencies had doubled!
Now I'm sure this is a standard result, and I have been thinking about it for several hours, but I really cannot 'see' why the frequency should double.
Here's a few thoughts
1) sin(2*pi*f*t) goes to zero when f*t goes to zero. If the f phasor is pinning round as fast at the t phasor then the number of zeros will be greater
2) (n+1)^2 -n^2 is the number of zero crossings in the nth second of V3, whereas it is only n(n+1)-n^2 for V2
3) omega=d theta/dt
I've set omega=t*2*pi
so 2*pi*t dt = d theta
hence 1/2 *2*pi*t^2+c =theta
And that half is missing from V3 and is the cause of the frequency doubling
But I am still confused, and cannot see a good explanation why the step from V2 to V3 'needs' the 1/2
Cheers
Greg Locock