Problem with SPICE calculation of the ripple in half-wave rectifier

AI Thread Summary
The discussion centers on discrepancies between SPICE simulation results and theoretical calculations of ripple voltage in a half-wave rectifier circuit. SPICE indicates a ripple voltage of approximately 31mV, while calculations yield 38mV using the formula involving load resistance, capacitance, and frequency. The presence of a high series resistance in the power supply affects the capacitor's charge and discharge times, leading to different measurements. Participants suggest revising the approach to ripple voltage calculations and emphasize the importance of accurate node labeling and unit representation in SPICE. The conversation highlights the need for careful consideration of both theoretical and simulation methods to achieve consistent results.
Gio47818732
Messages
3
Reaction score
1
TL;DR Summary
spice does show a different ripple voltage than the one calculated using spice I load or Vdc load and Req and C
spice shows a ripple voltage of about 31mV, but calculating the ripple with the formula i get 38mV wich is really weird.
spice does show a different ripple voltage than the one calculated using spice I load or Vdc load and Req and C.
spice shows a ripple voltage of about 31mV, but calculating the ripple with the formula i get 38mV wich is really weird.

as you can see in the photo i get a dc output voltage of around 3.511 wich divided by (Req*C*f) gives me 38mV. Spice tho shows me in output a ripple voltage measured of around 31mV wich makes no sense since formula is ripple voltage=Vdc/(Req*C*f) since capacitance equivalent impedence is supposed to be 0. also if that even counted that should increase the ripple voltage instead of giving me a ripple voltage smaller by 7mV than the calculated one.

thank you for the answers.

Screenshot 2024-12-09 161253.png
 

Attachments

  • Screenshot 2024-12-09 161306.png
    Screenshot 2024-12-09 161306.png
    16.8 KB · Views: 36
  • Screenshot 2024-12-09 161749.png
    Screenshot 2024-12-09 161749.png
    24 KB · Views: 41
  • Screenshot 2024-12-09 161844.png
    Screenshot 2024-12-09 161844.png
    24.1 KB · Views: 36
Last edited by a moderator:
Engineering news on Phys.org
Welcome to PF.

I know it is a simple schematic file.asc, but there is critical embedded detail that does not show in screenshots. Please attach your LTspice file.asc to your next post so I can run the simulation.

You will need to change the extension from file.asc to file.txt, or make it file.asc.txt so it can be attached to your post.
 
  • Like
Likes Gio47818732
here the schematic, sorry i didn't add it before
 

Attachments

You have a high series resistance 50R0 in the power supply. The capacitor charge time, (or phase angle), is therefore longer than expected, so the discharge time is proportionally less. I measure the discharge time, dt, to be 823.5 us, NOT the 1000 us you may assume.
C = Q / v ; The definition of capacitance.
C = i * t / v ;
C = i * dt / dv ;
dv = i * dt / C = ripple voltage.

Your LTspice .meas directive results in:
vripple: PP(v(n002))=0.031065 FROM 0 TO 0.05
vdc_out_load: AVG(v(n002))=3.51168 FROM 0 TO 0.05

C = 47.8 uF
Requ = 1.923 k
Average i discharge, is AVG(Vout) / Requ
dv = i * dt / C= ( 3.51168 / 1k923 ) * 823u5 / 47u8 = 0.03146 V
The 0.4 mV difference is to do with the switch on and off times of the diode, and my ability to put a cursor on a pixel.

You need to revise your approach to the computation of the ripple voltage.

Label your nodes, so the automatic numbering does not change your .MEAS directive node when the circuit changes.

Do not include the units in spice, only the multiplier.
Replace the decimal point with the multiplier on schematics.
20 ms = 20.0 m = 20m0 .
A one farad capacitor, 1F , is only one femtofarad in SPICE.
 
  • Like
Likes Gio47818732, DaveE and berkeman
thanks for the headups, they made me rethink my approach to the problem and made me realize things i didn't before when using spice; also going back to my theorical calculations of the ripple it seems they were also off due to me using the approximated to the first order formula for the ripple , the complete formula not including the generator resistance would have been (V-Von)*(1-exp(-(T-T{it takes to charge the condensator})/(R{equivalent}*C))).
where V-Von is the dc current i measure in out, also if we consider the equivalent series resistance of the condensator in case it matters we would need to add R_{of the capacitance}*(V-Von)/(R{equivalent}.
Correct me if i am wrong,i just wrote it in case someone has my same problem and forgets they are using the approximate formula instead of the complete one
 
The formula you used, works well for a conservative design, in that under most circumstances, it included a safety margin.

Attached is a cleaned-up schematic, that runs faster and sufficiently accurately. It measures ripple over two cycles at the end of the transient analysis.

Draft30-1.png
 

Attachments

Thread 'Weird near-field phenomenon I get in my EM simulation'
I recently made a basic simulation of wire antennas and I am not sure if the near field in my simulation is modeled correctly. One of the things that worry me is the fact that sometimes I see in my simulation "movements" in the near field that seems to be faster than the speed of wave propagation I defined (the speed of light in the simulation). Specifically I see "nodes" of low amplitude in the E field that are quickly "emitted" from the antenna and then slow down as they approach the far...
Hello dear reader, a brief introduction: Some 4 years ago someone started developing health related issues, apparently due to exposure to RF & ELF related frequencies and/or fields (Magnetic). This is currently becoming known as EHS. (Electromagnetic hypersensitivity is a claimed sensitivity to electromagnetic fields, to which adverse symptoms are attributed.) She experiences a deep burning sensation throughout her entire body, leaving her in pain and exhausted after a pulse has occurred...
Back
Top