Version 4 SHEET 1 3432 1540 WIRE 1520 32 1488 32 WIRE 1552 32 1520 32 WIRE 1696 32 1632 32 WIRE 2288 32 2208 32 WIRE 1488 48 1488 32 WIRE 1552 48 1552 32 WIRE 1632 48 1632 32 WIRE 2208 48 2208 32 WIRE 256 80 144 80 WIRE 352 80 256 80 WIRE 144 128 144 80 WIRE 1488 144 1488 128 WIRE 1552 144 1552 112 WIRE 1632 144 1632 128 WIRE 2208 160 2208 128 WIRE 144 256 144 208 WIRE 256 352 144 352 WIRE 352 352 256 352 WIRE 2272 352 2208 352 WIRE 2496 384 2416 384 WIRE 144 400 144 352 WIRE 32 432 -32 432 WIRE 64 432 32 432 WIRE -32 464 -32 432 WIRE 144 528 144 480 WIRE -32 576 -32 544 WIRE 256 656 144 656 WIRE 352 656 256 656 WIRE 144 704 144 656 WIRE 32 736 -32 736 WIRE 64 736 32 736 WIRE -32 768 -32 736 WIRE 144 832 144 784 WIRE -32 880 -32 848 WIRE 256 976 144 976 WIRE 352 976 256 976 WIRE 144 1024 144 976 WIRE 32 1056 -32 1056 WIRE 64 1056 32 1056 WIRE -32 1088 -32 1056 WIRE 144 1152 144 1104 WIRE -32 1200 -32 1168 WIRE 1440 1376 1376 1376 WIRE 1376 1392 1376 1376 WIRE 1376 1488 1376 1472 FLAG -32 576 0 FLAG 32 432 freq1 FLAG 144 256 0 FLAG 256 80 Times1 FLAG 144 528 0 FLAG 256 352 EndsAt1 FLAG 144 832 0 FLAG 256 656 EndsAt0.5 FLAG -32 880 0 FLAG 32 736 freq2 FLAG 144 1152 0 FLAG 256 976 IsAt1 FLAG -32 1200 0 FLAG 32 1056 freq3 FLAG 1632 144 0 FLAG 1488 144 0 FLAG 1552 144 0 FLAG 1520 32 int FLAG 1696 32 this-is-what-u-want FLAG 1376 1488 0 FLAG 1440 1376 helmuts_example FLAG 2208 160 0 FLAG 2288 32 using_the_buildin_integral_function FLAG 2208 352 freq1 FLAG 2496 384 special_function_MODULATE SYMBOL voltage -32 448 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value PWL(0 0 1 1) SYMBOL bv 144 112 R0 SYMATTR InstName B1 SYMATTR Value V=sin(2*pi*60*time*1) SYMBOL bv 144 384 R0 SYMATTR InstName B2 SYMATTR Value V=sin(2*pi*60*time*v(freq1)) SYMBOL bv 144 688 R0 SYMATTR InstName B3 SYMATTR Value V=sin(2*pi*60*time*v(freq2)) SYMBOL voltage -32 752 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V2 SYMATTR Value PWL(0 0 1 0.5) SYMBOL bv 144 1008 R0 SYMATTR InstName B4 SYMATTR Value V=sin(2*pi*60*time*v(freq3)) SYMBOL voltage -32 1072 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 WINDOW 3 19 100 Left 0 SYMATTR Value PWL(0 1 1 1) SYMATTR InstName V3 SYMBOL bv 1632 32 R0 SYMATTR InstName B5 SYMATTR Value V=sin(2*pi*60*v(int)) SYMBOL bi 1488 128 R180 WINDOW 0 24 88 Left 0 WINDOW 3 24 0 Left 0 SYMATTR InstName B6 SYMATTR Value I=v(freq1) SYMBOL cap 1536 48 R0 SYMATTR InstName C1 SYMATTR Value 1 SYMBOL bv 1376 1376 R0 SYMATTR InstName B7 SYMATTR Value V = sin(2*pi*0.5*60*time*time) SYMBOL bv 2208 32 R0 SYMATTR InstName B8 SYMATTR Value V=sin(2*pi*60*Sdt(V(freq1))) SYMBOL SpecialFunctions\\modulate 2272 352 R0 WINDOW 3 -5 118 Left 0 SYMATTR InstName A1 SYMATTR Value mark=60 space=0 TEXT -64 -16 Left 0 !.tran 0 1s 0 100uS TEXT 232 104 Left 0 ;This signal is a constant 60 Hz (time multiplier of 1). TEXT 224 376 Left 0 ;This signal is 60 Hz when the control signal reaches 0.5V at time 0.5 seconds (time multiplier of 0.5)\nand 120 Hz at time 1 second (with time multiplier of 1). TEXT 224 680 Left 0 ;This signal is 60 Hz when the control signal reaches 0.5V at time 1 second (time multiplier of 0.5). TEXT 216 -16 Left 0 ;Experiments trying to make a circuit to sweep from 0 to 60 Hz over a period of 1 second. TEXT 232 1000 Left 0 ;This signal is a constant 60 Hz (time multiplier of 1V). TEXT 216 16 Left 0 ;Question: Why do the middle two circuits give twice the expected frequency? TEXT 1368 256 Left 0 ;f(t) is frequency(t)\n \nV(t) = sin(phi(t)) (1)\n \nphi(t) = Integral(2*pi*f(t)) (2)\n \nLet's derive both sides.\n \ndphi(t)/dt = 2*pi*f(t) (3)\n \nf(t) = 1/(2*pi) * dphi(t)/dt (4)\n \n\nLet's assume we want a linear sweep of the frequency f from\nF1 to F2 in the time TS.\n \nf(t) = F1 + (F2-F1)*t/TS (5)\n \nphi(t) = Integral( 2*pi*( F1 + (F2-F1)*t/TS ) ) (6)\n \nGeneral: Integral( a*(b + c*x) ) = a * (b*x + 0.5*c*x^2) (7)\n \nphi(t) = 2* pi * (F1*t + 0.5*(F2-F1)/TS*t*t) (8)\n \nAs a B-source:\n--------------------------------------------------\nV = sin(2*pi*(F1*time + 0.5*(F2-F1)/TS*time*time)) (9)\n--------------------------------------------------\n \nIf F1 is 0 as in your example (F2=60Hz, TS=1sec) :\n \nphi(t) = 2*pi*0.5*F2*t*t (10)\n \nWith the syntax of LTspice :\n \nphi(t) = 2*pi*0.5*F2*time*time = 2*pi*0.5*60*time*time (11)\n \nB-source: 0 to 60Hz in 1sec\n------------------------------\nV = sin(2*pi*0.5*60*time*time) (12) TEXT 1432 -16 Left 0 ;The anwser to the question is this circuit. TEXT 1344 192 Left 0 ;Helmut did some math why this works. TEXT 2056 -16 Left 0 ;Something Gerd came up with using the build-in integral function of LTspice TEXT 2080 280 Left 0 ;This is my prefered why to make a frequency sweep. RECTANGLE Normal 2016 1536 1296 224 2