Is there a way to add noise to a DC voltage source in LTspice? I'm trying to simulate a DC/DC converter and want to know how the circuit responds to a ripple/noise on the input. I.e. +/-100mV noise/ripple on a 15V DC source.
-
1\$\begingroup\$ No a DC voltage source is just that: DC, meaning no variations over time. Like an (ideal) battery. For voltages that change over time, use a vpulse or vpwl. You can use a vdc and a vpulse in series if you prefer. That would simply sum the voltages. \$\endgroup\$– BimpelrekkieCommented Oct 20, 2021 at 10:02
2 Answers
You can add a DC source in series with a ripple source and a noise source. The latter is a behavioral voltage source which can be found under components as bv. The advantage of separating B1 and V1 is that you can also assign an AC voltage to V1, so it will work in .ac analyses.
-
\$\begingroup\$
V1
andV2
can be combined into a single one, with the appropriate offset. \$\endgroup\$ Commented Oct 20, 2021 at 16:16 -
\$\begingroup\$ yup, you are right, @concernedcitizen I was wondering if the operation point for ac analyses would be calculated properly without a simple DC source. \$\endgroup\$– tobaltCommented Oct 20, 2021 at 16:34
-
\$\begingroup\$ The op point is calculated based on the initial value of the source. If it represents the DC then confetti. \$\endgroup\$ Commented Oct 20, 2021 at 17:13
One way is to low pass filter your DC source and high pass filter in your AC (noise) source like this:
The inductor and capacitor needs to be sufficiently large for your load in question.
-
3\$\begingroup\$ I would simply put V2 (sine) and V1 (DC) in series to get the same voltage across R1 \$\endgroup\$ Commented Oct 20, 2021 at 10:03
-
\$\begingroup\$ @Bimpelrekkie Ah yes, even easier! \$\endgroup\$– winnyCommented Oct 20, 2021 at 10:47
-
\$\begingroup\$ You can also just use an AC source with a DC offset if you want the ripple to be a sinusoid. \$\endgroup\$– RyanCommented Oct 20, 2021 at 11:07
-
\$\begingroup\$ I ended up using a behavioral voltage source with a value of V=15+(white(2e6*time)/5) \$\endgroup\$– JaapCommented Oct 20, 2021 at 11:22
-
\$\begingroup\$ @Jaap Many solutions to choose between! \$\endgroup\$– winnyCommented Oct 20, 2021 at 11:29