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: 37
  • Screenshot 2024-12-09 161749.png
    Screenshot 2024-12-09 161749.png
    24 KB · Views: 51
  • Screenshot 2024-12-09 161844.png
    Screenshot 2024-12-09 161844.png
    24.1 KB · Views: 37
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

Hey guys. I have a question related to electricity and alternating current. Say an alien fictional society developed electricity, and settled on a standard like 73V AC current at 46 Hz. How would appliances be designed, and what impact would the lower frequency and voltage have on transformers, wiring, TVs, computers, LEDs, motors, and heating, assuming the laws of physics and technology are the same as on Earth?
While I was rolling out a shielded cable, a though came to my mind - what happens to the current flow in the cable if there came a short between the wire and the shield in both ends of the cable? For simplicity, lets assume a 1-wire copper wire wrapped in an aluminum shield. The wire and the shield has the same cross section area. There are insulating material between them, and in both ends there is a short between them. My first thought, the total resistance of the cable would be reduced...
I used to be an HVAC technician. One time I had a service call in which there was no power to the thermostat. The thermostat did not have power because the fuse in the air handler was blown. The fuse in the air handler was blown because there was a low voltage short. The rubber coating on one of the thermostat wires was chewed off by a rodent. The exposed metal in the thermostat wire was touching the metal cabinet of the air handler. This was a low voltage short. This low voltage...
Back
Top