RMS and DC Value Displays of Waveforms on LTspice

  • Thread starter dvscrobe
  • Start date
36
9
I hope I am posting this in correct forum section. I just downloaded LTspice for my Power Electronics course. Does anyone know if the software can display the DC component of a waveform such as found by determining the Fourier series of a waveform?
 

berkeman

Mentor
55,115
5,338
I hope I am posting this in correct forum section. I just downloaded LTspice for my Power Electronics course. Does anyone know if the software can display the DC component of a waveform such as found by determining the Fourier series of a waveform?

:smile:
 
36
9
berkeman, I did take notice of that post. I tried this on a Mac and PC and still could not get any results no matter what I clicked. I must be doing something wrong.
 

berkeman

Mentor
55,115
5,338
Maybe post some screenshots? The "average" voltage should be the DC voltage. Are the functions not working, or are they giving you answers that don't seem right?
 

berkeman

Mentor
55,115
5,338
Huh, weird. What happens when you take out D1?
 

Baluncore

Science Advisor
6,534
1,983
Does anyone know if the software can display the DC component of a waveform such as found by determining the Fourier series of a waveform?
I believe that you are looking at too short a part of the plot as the voltage is still increasing from the initial conditions.
RMS must be computed over a time period. To avoid window errors, the number of cycles in that period must be an exact integer, or be very large.

Read help for waveform arithmetic; Section 2. "Compute the average or RMS of a trace".
Select the plot window. Hold down the control key while you left click the mouse on the trace label.

Read the report in the small window.
For your circuit between exactly 1 and 2 seconds, the average is 5.2756V, the RMS is 5.2759V.
 

Baluncore

Science Advisor
6,534
1,983

Baluncore

Science Advisor
6,534
1,983
There is a work-around using .MEAS that you might try.

Place a .op command on the schematic;
.measure tran fred RMS V(out)
Then run the simulation;
When it finishes pull down the “view” menu and select “SPICE error log”; or <ctrl>L
You will see a line with the parameter label fred: and the result of the measurement.
fred: RMS(v(out))=5.29009 FROM 0 TO 0.18

Here the default time window for RMS integration is the displayed .TRAN trace.
You can specify all sorts of traps for the time window to synchronise with signal phase.

Attached is the .asc file that works for me.
Remove the .txt extension to run in LTspice.
 

Attachments

36
9
I think I may have been the victim of the “always zero” bug. I’ll have to check out the Yahoo group that someone posted here. I’m not a member of that. I contacted the developer and I was asked if I synced my release. I was not sure what that meant but I uninstalled the app from my Mac and reinstalled. This time I noticed that my security settings didn’t recognize the developer. So, I had to approve of the install in my settings. Everything is working fine now. Thanks for the replies here.
 
36
9
Now that I got the bug out of the way, I can move on to what I was trying to accomplish in the first place. I wanted to prove when RMS and a DC average are the same values and when they are not. I am learning 3-phase rectifiers and the textbook was using the DC average of the pulses to calculate the power output of the diode network. This was a beginner circuit and the load was just a resistor with no capacitor for smoothing out the pulses. I questioned my instructor why RMS wasn’t being used. It turns out from LTspice that the RMS and DC average is the SAME thing! I find that hard to believe.
 
36
9
Here is my circuit and the waveform of the voltage across the resistor.
245747
245748
 

Baluncore

Science Advisor
6,534
1,983
When you “synch” your LTspice you bring it up to the current release version with the latest bug fixes, unfortunately, along with any new bugs.

You have noticed how LTspice sets the amplitude of a sine wave as the peak voltage.
That is why you specify a 170 Vpeak sinewave rather than 120 Vrms.

If you add a .txt extension to your schematic.asc file to make it schematic.asc.txt you can attach it to your post on this forum. I can then modify your schematic.asc by adding an example of the appropriate RMS integration function, without having to re-enter your circuit.

Here is an example.
 

Attachments

36
9
Baluncore, that is cool trick. I added the .txt to my circuit file.
 

Attachments

36
9
Balauncore, thanks for this file. I appreciate. That is neat how you can modify someone's test plan simply by having it converted to a text file. This reminds me of an SEL class I attended. SEL makes substation microprocessor relays. I was using a digital test set to simulate voltages and currents to the relay, and the instructor had me create and modify a text file that the test set could use. I haven't play with this file yet, so will follow back. Right now, recovering from a midterm on power electronics.
 

Baluncore

Science Advisor
6,534
1,983
The LTspice .asc and .plt files are human readable text files. I do sometimes edit them directly with a text editor when I want to search and replace throughout. But the reason for adding the .txt is to let this forum know it is a text file, so that it can be attached to a post. When the .txt extension is removed, LTspice executes it like a normal.asc file.
 
36
9
If you have a one volt AC to a full wave rectifier, the DC average of the DC pulses will be .636 but the RMS of same will be .707. What voltage would you use to calculate real power to a resistive load?
 

sophiecentaur

Science Advisor
Gold Member
23,148
3,714
The mean energy per unit time (i.e. average power) will be the RMS value - whatever the waveform. The Mean Voltage for the AC signal is zero but the mean of the rectified signal happens to be 0.636V. There is more than just the DC power in the rectified signal as there is an 'AC Component'.
Take another, SIMPLER, example. A +/- 1V square wave has an RMS value of 1V and that is the same as the RMS value for the full wave rectified signal (1V). The mean voltage for the square wave is zero but the mean voltage for the rectified signal is 1V (it's 1V all the time).
 
36
9
sophiecentaur, Thanks. It clicks better when you consider a square wave. I think where I have been going wrong is that I was using calculus to determine the average value of a full wave rectifier to calculate the real power to a resistive load. So, for a 1V AC rectified waveform, full wave, real power would be equal to .707 squared divided by resistance. Is that right?
 

Baluncore

Science Advisor
6,534
1,983
So, for a 1V AC rectified waveform, full wave, real power would be equal to .707 squared divided by resistance. Is that right?
It depends on what exactly you mean by “1V AC”. It is true for a mathematical sinewave with peak amplitude = 1.

A 1.0V amplitude sinewave generated by LTspice is a ±1.000 Vpeak sinewave = 0.7071 Vrms = 2.0 Vpeak-peak.
If you rectify it perfectly, it still has 0.7071 Vrms, referenced to zero.

A 1.0 Vrms sinewave has a peak amplitude of ±1.4142 Vpeak = 2.8284 Vpeak-peak. For sinewaves in the commercial power world, VAC is assumed to be Vrms unless otherwise specified as say Vp or Vpp.
With an LTspice model source you must be more careful to specify what you mean.

When you refer to a square wave you need to clearly specify if it is symmetrical about zero, or if it is offset and alternates between say zero and a fixed voltage.
 
36
9
Yes, you are absolutely right. I forgot to clarify that. I meant a 1V peak AC signal. Thanks! If you just say a voltage value, that implies you mean the RMS value. Thanks!
 

Want to reply to this thread?

"RMS and DC Value Displays of Waveforms on LTspice" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top