Can you generate a sinc waveform is KiCad

Hey KiCaders,
I was wondering if it is possible to have a voltage source generate a sinc waveform (sin(x)/x)? The option I see in the VSIN component are pulse, sinusoid, exponential…etc. Any thoughts?
Thanks,
-May

A voltage source may create a waveform versus time.

If you talk about sin(t)/t, and of course t can only be positive: yes, you can.

sin(t)/t
.subckt sintot 1 2
Bsin 1 2 v = sin(TIME)/TIME
.ends

xs out 0 sintot

.control
tran 0.1 20 
plot v(out)
.endc

.end

You may store the sub circuit in a sin.lib file and then attach it to a suitable symbol with two nodes. TIME may be scaled by a suitable factor and shifted by any value. The Netlist shown above will run in standard ngspice.

1 Like

The next netlist contains a complete sin sub circuit:
You may scale the time, shift the time, and change the output amplitude.


.subckt sintot 1 2
.param scf = 1  ; time scale factor
.param offs = 0 ; time offset
.param amp = 1  ; maximum output voltage
Bsin 1 2 v = {amp} * sin((TIME + {offs}) * {scf})/((TIME + {offs}) * {scf})
.ends

xs out 0 sintot scf = 2 offs = -15 amp = -1.5

.control
tran 0.1 20 
plot v(out)
.endc

.end
1 Like