* Z:\home\khalils\Downloads\files\data\raw_asc\171d70b62c0b_swept_sine_cosine.asc
* Generated by LTspice 26.0.1 for Windows.
B5 out2 0 V=sin(2*pi*Sdt(V(1))+phi)
B6 1 0 V=time*0.1
B1 out1 0 V=sin(2*pi*Sdt(V(1)))
A1 1 N001 0 0 0 0 o1 0 MODULATOR mark=1 space=0
A2 1b N001 0 0 0 0 o2 0 MODULATOR mark=1 space=0
V1 N001 0 1
R1 1 1b {R1}
I1 0 1b PULSE(0 {phi/2/pi} 0 1n 1n {1/R1})
.tran 0 50 0 1m
.options plotwinsize=0
* *** Swept Sine & Cosine Sources (or arbitrary phase shift) Vers. 25-jul-05 / G.Mi ***\n and realization of arbitrary phase jumps with the MODULATE device
* Delta-pulse to generate\nequivalent initial phase\nconstant phi
* Solution using 2 MODULATE devices
* Solution using "home-made" swept sine sources
.param phi=pi/2 ;phase shift
.param R1=1k
* usable also for arbitrary\nphase jumps during simulation
* NOTE: max.Tstep generally is\nrequired because there's no step-size\noptimization for the B-sources\nas there is for MODULATE.\nOtherwise, significant phase\ndeviations between MODULATE\nand B-source realizations may occur!!
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 1024 1284
WIRE -368 608 -368 592
WIRE -352 992 -352 960
WIRE -272 592 -368 592
WIRE -272 896 -272 592
WIRE -272 1056 -272 896
WIRE -240 1056 -272 1056
WIRE -112 1056 -160 1056
WIRE -112 1088 -112 1056
WIRE -112 1200 -112 1168
WIRE -80 1056 -112 1056
WIRE -64 592 -272 592
WIRE -16 960 -352 960
WIRE -16 1120 -16 960
WIRE 16 480 16 464
WIRE 16 496 16 480
WIRE 16 608 16 592
WIRE 16 624 16 608
WIRE 16 896 -272 896
WIRE 16 960 -16 960
WIRE 16 1056 -80 1056
WIRE 16 1120 -16 1120
WIRE 112 464 16 464
WIRE 112 592 16 592
WIRE 224 928 160 928
WIRE 224 1088 160 1088
FLAG 16 688 0
FLAG 112 592 out2
IOPIN 112 592 Out
FLAG -368 688 0
FLAG -64 592 1
IOPIN -64 592 Out
FLAG 16 560 0
FLAG 112 464 out1
IOPIN 112 464 Out
FLAG 224 928 o1
IOPIN 224 928 Out
FLAG 224 1088 o2
IOPIN 224 1088 Out
FLAG -352 1072 0
FLAG -80 1056 1b
FLAG -112 1200 0
SYMBOL bv 16 592 R0
WINDOW 3 35 84 Left 0
SYMATTR Value V=sin(2*pi*Sdt(V(1))+phi)
SYMATTR InstName B5
SYMBOL bv -368 592 R0
WINDOW 3 -50 145 Left 0
WINDOW 0 37 55 Left 0
SYMATTR Value V=time*0.1
SYMATTR InstName B6
SYMBOL bv 16 464 R0
WINDOW 3 35 84 Left 0
SYMATTR Value V=sin(2*pi*Sdt(V(1)))
SYMATTR InstName B1
SYMBOL SpecialFunctions\\modulate 16 896 R0
WINDOW 3 16 -20 Left 0
SYMATTR Value mark=1 space=0
SYMATTR InstName A1
SYMBOL SpecialFunctions\\modulate 16 1056 R0
WINDOW 3 16 -20 Left 0
SYMATTR Value mark=1 space=0
SYMATTR InstName A2
SYMBOL voltage -352 976 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 1
SYMBOL res -256 1072 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R1
SYMATTR Value {R1}
SYMBOL current -112 1168 R180
WINDOW 0 -34 -4 Left 0
WINDOW 3 -134 -72 Left 0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName I1
SYMATTR Value PULSE(0 {phi/2/pi} 0 1n 1n {1/R1})
TEXT 342 650 Left 0 !.tran 0 50 0 1m
TEXT 344 736 Left 0 !.options plotwinsize=0
TEXT -432 328 Left 0 ;*** Swept Sine & Cosine Sources (or arbitrary phase shift)     Vers. 25-jul-05 / G.Mi ***\n     and realization of arbitrary phase jumps with the MODULATE device
TEXT -400 1136 Left 0 ;Delta-pulse to generate\nequivalent initial phase\nconstant phi
TEXT -72 808 Left 0 ;Solution using 2 MODULATE devices
TEXT -184 408 Left 0 ;Solution using "home-made" swept sine sources
TEXT -440 488 Left 0 !.param phi=pi/2 ;phase shift
TEXT -248 984 Left 0 !.param R1=1k
TEXT -72 1176 Left 0 ;usable also for arbitrary\nphase jumps during simulation
TEXT 344 448 Left 0 ;NOTE: max.Tstep generally is\nrequired because there's no step-size\noptimization for the B-sources\nas there is for MODULATE.\nOtherwise, significant phase\ndeviations between MODULATE\nand B-source realizations may occur!!
RECTANGLE Normal 320 1280 -432 832 2
RECTANGLE Normal 320 752 -80 432 2