Average power in three phase LTSpice simulation

Thread Starter

Manue63

Joined Jun 15, 2023
6
Hello everyone,

I'm new to using LTSpice and I'm having some problems measuring the average power in one phase of a three phase circuit.

In order to have an idea of the expected results, I made simulations with other applications (OpenModelica, Geogebra) where I obtain exactly the same values of power (383 W) and intensity (1.77 A) in each phase.

When I start modeling with LTSpice, I have lower values of power (376 W) and intensity (1.75 A).

How is it possible ? I took an integer period and I did not take into account the transient period of the signal (measurement carried out between 500ms and 1s)

Thanks a lot for your help.
 

Attachments

MrAl

Joined Jun 17, 2014
13,686
Hello everyone,

I'm new to using LTSpice and I'm having some problems measuring the average power in one phase of a three phase circuit.

In order to have an idea of the expected results, I made simulations with other applications (OpenModelica, Geogebra) where I obtain exactly the same values of power (383 W) and intensity (1.77 A) in each phase.

When I start modeling with LTSpice, I have lower values of power (376 W) and intensity (1.75 A).

How is it possible ? I took an integer period and I did not take into account the transient period of the signal (measurement carried out between 500ms and 1s)

Thanks a lot for your help.
Hi,

Which phase are you measuring?

For values that have to be that precise you probably have to manually set the max time step size to some small value. If the time step is too large the approximation the software uses is not as good.
You also have to make sure to let the simulation run long enough such that the exponential part of the response goes to zero or very close to zero. Sometimes a cosine source instead of a sine source helps with this too because of the solutions near t=0.
 
Last edited:

crutschow

Joined Mar 14, 2008
38,423
I get much lower values (0.56A and 48.5W) then what you posted.
It would seem the .asc circuit you attached is not the one you simulated.

Also the .asc file has slightly different values for the three load resistors.
Is that intentional?
 

Thread Starter

Manue63

Joined Jun 15, 2023
6
Thank you very much for your answer.

I measure phase 1 but I have the same results on the other phases because my circuit is balanced.

As you advised me, I made a longer simulation (10s) and for the time step I took a small value (10µs or 5 µs) and I obtain an average power of 382.51 W , which is much closer to the expected value. Same thing for the intensity

To do the average power should I take a lot of periods (between 4s to 10s) or just a few (between 9s to 10s)?

Thanks a lot for your help
 

Thread Starter

Manue63

Joined Jun 15, 2023
6
I get much lower values (0.56A and 48.5W) then what you posted.
It would seem the .asc circuit you attached is not the one you simulated.

Also the .asc file has slightly different values for the three load resistors.
Is that intentional?
Sorry Crutschow,

I got the wrong file. Here is the correct filename with the modifications that MrAI advised me.
 

Attachments

MrAl

Joined Jun 17, 2014
13,686
Thank you very much for your answer.

I measure phase 1 but I have the same results on the other phases because my circuit is balanced.

As you advised me, I made a longer simulation (10s) and for the time step I took a small value (10µs or 5 µs) and I obtain an average power of 382.51 W , which is much closer to the expected value. Same thing for the intensity

To do the average power should I take a lot of periods (between 4s to 10s) or just a few (between 9s to 10s)?

Thanks a lot for your help
Hello again,

The way you can find this out is to take into account some cycles, let's say 2, and obtain a result. Then, next take more cycles, let's say 4, and obtain a result. If the results are the same then you have it. It's probably better to watch the output in the time domain to see if it is still decreasing or not, and if not, then you know how many cycles you have to wait.
The mathematical way to do it might be a little complicated because you have to convert the function from the frequency domain to the time domain, then extract the exponential part and set that to some small value like 1e-6, then solve for 't' (time). When you get 't' this way, you then know how much time you have to wait. It's always good to check with a simulator anyway though to make sure it is still not decreasing because some of these with large inductors and small resistor values can take a very long time to settle out.
The whole idea is we are waiting for the exponential part to decay to a very low value, so we are left with just the sinusoidal part(s).

In this case with your circuit and component values try 10 cycles and see if it stops decreasing.

I calculated the current and it closely matches your value in LT spice of 1.75322 amps RMS.

It's interesting that if you use a cosine wave instead of sine you get a result that has less of an exponential part. The ideal wave would be:
A*sin(w*t+ph)
where ph is the phase shift, and for a cosine wave it would be pi/2.
To get it right though we have to solve for ph such that the exponential part goes to a very small value like 1e-6 or something like that, and then it no longer influences the amplitude of the sinusoidal part, even near t=0.
For this problem though it looks like it is not exactly a cosine wave. If we solve for ph we get a phase shift very slightly less than pi/2. That's using the standard 16 digits of precision, which may change if we go to a higher precision i didn't check that yet.
You can look into this at a later date perhaps, or just see what you get with a cosine wave for all three phases.
The idea here is to not have to wait to see the pure sine part of the result.
 

Thread Starter

Manue63

Joined Jun 15, 2023
6
Hi,
Thank you very much for all these explanations. Following your first answer I had tried a cosine instead of the sine and it turned out that my results converged more quickly. A judicious choice of the number of periods and of their location makes it possible to obtain results entirely in accordance with the theory.
Thank you again for your help.
 

MrAl

Joined Jun 17, 2014
13,686
Hi,
Thank you very much for all these explanations. Following your first answer I had tried a cosine instead of the sine and it turned out that my results converged more quickly. A judicious choice of the number of periods and of their location makes it possible to obtain results entirely in accordance with the theory.
Thank you again for your help.
Hi again,

Oh you are welcome, and one thing i noticed right off is that when you run the simulation if you have the max time set high enough, you can see the sine waves start out higher up and then sort of 'float' downward until they start to level off where they are centered at zero as a normal sine wave would be. After they settle like that, that is the time to start measuring peaks and such. The other indicator is that the positive peaks are equal to the negative of the negative peaks, so if after the wave settles out you see +2.000v peak on the top then on the next half cycle you should see -2.000v peak on the bottom. If you see +2.005v on the top and -1.995v on the bottom, then it is close but not exactly settled out yet. The amplitude should be symmetrical about zero.

It's also interesting when I use the LT Spice simulator I measure a peak that is a tad higher than the calculation. This is both for the positive peak and the negative peak. I'll have to check into why that happens. I did not check with another simulator yet though or use a different solver method, which may improve this. It could just be a solver accumulation error, which luckily is usually small. The hand calculations are like an exact science, the simulator solvers are numerical which means they are always lean slightly toward an approximation rather than exact.
I'll probably look into this because usually i get results that are more exact even from simulators. I guess another issue could be one of the background settings like the min conductance setting or something like that.
 

MrAl

Joined Jun 17, 2014
13,686
Hello again,

Ok, going over this again I found some sort of anomaly with LT Spice.

First, I calculate close to 1.753 amps RMS for the current through R4, but the LT Spice simulator shows close to 1.77 amps RMS. That is not much, but as I said earlier, I usually see values that match closer than that.

Second, when i saw the value of R4 and the value of L1, i was surprised the first time i ran the simulation under LT Spice because the exponential part damped out so quickly, something i did not expect to see with a 0.001 Ohm resistance in series with an inductor as large as 1.2 Henries. I ignored that surprise, and went ahead and trusted the simulator. The way it shows the damping is that it settles down to a reasonable value (say 0.01v or 0.001v) within about 0.5 seconds or so. That's the time when the sine part no longer floats downward over time.

Now i do the time domain calculation, and find that it takes a whopping 2 hours to settle down to a low value like that, and at least an hour (3600 seconds) to get to some slightly larger but still reasonable value. There is no way it shows anything less than 1 second which is what the LT Spice simulator shows. So maybe i made a mistake in the calculation in the time domain.
I went back and isolated the exponential part, and same thing. Takes a long time to settle, which is actually typical of a very small resistance in series with a very large inductance when first turned on (starting from t=0).
Could I still be making a mistake.

I decided to try another simulator, the MicroCap simulator.
Interestingly, that simulator shows what the hand calculations show, that using a sine wave, it takes a very long time for the sine current through R4 to settle to some reasonably constant (sine) amplitude.
What the difference between the LT Spice simulator and the MicroCap simulator is I don't know yet when it comes to this difference.
I also tried using the Gear solver method in LT Spice but it made only a tiny difference of maybe 100ua peak current through R4.

So, for now I am stumped as to why the LT Spice simulator shows a much, much faster damping out of the exponential part while calculations and the MicroCap simulator match up pretty well showing a much longer time delay.

Oh, and also BTW, the amplitude result using the MicroCap simulator comes out closer to the hand calculations also, closer to 1.753 amps RMS through R4.

At this point i am guessing that it is some global variable that is set different, although it is hard to believe that there would be some global value that could cause that much of a difference. If i get time i will look into this further. I don't think it should be that much in error regardless though, so maybe it is something more serious.
 

Thread Starter

Manue63

Joined Jun 15, 2023
6
Hi,

I did some simulation tests yesterday because I asked myself a lot of questions in view of the results of the intensities obtained.
In a balanced three-phase circuit, the currents and voltages in each of the phases all have the same modulus, only the phase shift changes. The phase difference between the voltages being 120° and the phase difference between all the currents also 120°. I specify that the values which I use for the simulation are those which I used to carry out a practical work and the results of 1.77A and 383 W are the values obtained during the experiment.

A few observations that caught my attention:

1 - It seemed obvious to me that when I started up my circuit, the 3 phases would be powered at the same time and the components should therefore react in the same way. However, looking more closely at the results of the simulation (.tran 0 2 0 2µ) in intensity, I noticed that at the beginning of the simulation I had a current of almost 0A in phase A, -25 A in phase A. phase B and 25 A in phase C. If I place myself between 700 ms and 2s, I obtain an I_RMS value of 1.772 A in each of the phases and an average power of 382.39W in each of the phases as well.

Question: where do such high and opposite currents come from in phases B and C?

2 - In view of the results obtained at the start of the simulation, I removed the internal resistance (12.6 Ohm) from my coils and set them to zero, internal resistance that I had put in "series resistance". The same simulation conditions as before give me intensities at the start of the simulation for phase A: 0A, Phase B: -281 kA and phase C: 281 kA.... The average values of I and P are the same as before ...These starting current values seem enormous to me and above all not achievable.

If I put a resistance in series with the coil, I find the same results as in 1. So I conclude that the internal resistance of the coil can be represented by a resistance in series with a pure coil.

3 - I read somewhere, I don't remember where, that it was possible to put initial conditions for the coils in the form .ic I(L1)=0 in order to specify the intensity at t=0s. So I put this command for each of my coils. The results on the intensities show me that at the start (between t = 0s and t = 0.2s), the currents in phase B and C have the same behavior (value between -2.9A and 2.1A) while the intensity in phase A is higher (varies between -1.7 A and 3.3 A). As for the phase difference between the intensities, I have 120° as expected between each of them.

Why these different intensities for the same starting conditions with this balanced circuit?

4 - In order to obtain a similar behavior for the intensities between my 3 phases, I tried to find the initial conditions which seemed to correspond to what I thought I would obtain. After several tries, I found that it was necessary to put .ic I(L1)=0; .ic I(L2)=1.3; .ic I(L3)=1.3. However, I don't know where this value comes from?

5 - I did an identical simulation but with capacitors instead of coils and I don't have this damping phenomenon at the start. I conclude that the phenomena observed with the coil in parallel is due to the coil itself but I do not understand why.

6 - I did the same simulation but with the coils in series with the resistors in each phase with the initial condition .ic I(L)=0 in each coil. This time all my currents start at 0 and behave the same way.

In the end I ask myself a lot of questions about the behavior of these coils in a parallel assembly because I do not understand the origin of this behavior. For me I should have had the same intensities but shifted by 120° in each phase.

I saw that my first remarks made you ask some questions, so I took the liberty of sharing with you my observations and my misunderstanding following various simulations. I hope you can enlighten me in order to have a better understanding of the simulation of my circuit.

Thanks for your help.

Have a good day
 

WBahn

Joined Mar 31, 2012
32,777
When you set up a simulation, the simulator has to make assumptions about the state of the system at t = 0. Most simulators make one of two common assumptions -- either that all sources had whatever value they have t = 0 for all time t < 0, or that all sources had zero output for all time t < 0 and jump instantly to their value at t = 0. In a circuit that is in AC steady state, neither of these solutions yield the "correct" state of the system at t = 0, only a starting point and the circuit takes time for the resulting transient response to die out and for the system to reach AC steady state. By explicitly determining the voltages and currents for key nodes and setting initial conditions accordingly, you can force the simulator to start out in a state consistent with being in AC steady state or, at the very least, in a state from which the transient dies out much more quickly.
 

Thread Starter

Manue63

Joined Jun 15, 2023
6
Thank you for your reply. This therefore explains the results I obtained at the start of the simulation.
Thank you again for your help.
 

MrAl

Joined Jun 17, 2014
13,686
Hi,

I did some simulation tests yesterday because I asked myself a lot of questions in view of the results of the intensities obtained.
In a balanced three-phase circuit, the currents and voltages in each of the phases all have the same modulus, only the phase shift changes. The phase difference between the voltages being 120° and the phase difference between all the currents also 120°. I specify that the values which I use for the simulation are those which I used to carry out a practical work and the results of 1.77A and 383 W are the values obtained during the experiment.

A few observations that caught my attention:

1 - It seemed obvious to me that when I started up my circuit, the 3 phases would be powered at the same time and the components should therefore react in the same way. However, looking more closely at the results of the simulation (.tran 0 2 0 2µ) in intensity, I noticed that at the beginning of the simulation I had a current of almost 0A in phase A, -25 A in phase A. phase B and 25 A in phase C. If I place myself between 700 ms and 2s, I obtain an I_RMS value of 1.772 A in each of the phases and an average power of 382.39W in each of the phases as well.

Question: where do such high and opposite currents come from in phases B and C?

2 - In view of the results obtained at the start of the simulation, I removed the internal resistance (12.6 Ohm) from my coils and set them to zero, internal resistance that I had put in "series resistance". The same simulation conditions as before give me intensities at the start of the simulation for phase A: 0A, Phase B: -281 kA and phase C: 281 kA.... The average values of I and P are the same as before ...These starting current values seem enormous to me and above all not achievable.

If I put a resistance in series with the coil, I find the same results as in 1. So I conclude that the internal resistance of the coil can be represented by a resistance in series with a pure coil.

3 - I read somewhere, I don't remember where, that it was possible to put initial conditions for the coils in the form .ic I(L1)=0 in order to specify the intensity at t=0s. So I put this command for each of my coils. The results on the intensities show me that at the start (between t = 0s and t = 0.2s), the currents in phase B and C have the same behavior (value between -2.9A and 2.1A) while the intensity in phase A is higher (varies between -1.7 A and 3.3 A). As for the phase difference between the intensities, I have 120° as expected between each of them.

Why these different intensities for the same starting conditions with this balanced circuit?

4 - In order to obtain a similar behavior for the intensities between my 3 phases, I tried to find the initial conditions which seemed to correspond to what I thought I would obtain. After several tries, I found that it was necessary to put .ic I(L1)=0; .ic I(L2)=1.3; .ic I(L3)=1.3. However, I don't know where this value comes from?

5 - I did an identical simulation but with capacitors instead of coils and I don't have this damping phenomenon at the start. I conclude that the phenomena observed with the coil in parallel is due to the coil itself but I do not understand why.

6 - I did the same simulation but with the coils in series with the resistors in each phase with the initial condition .ic I(L)=0 in each coil. This time all my currents start at 0 and behave the same way.

In the end I ask myself a lot of questions about the behavior of these coils in a parallel assembly because I do not understand the origin of this behavior. For me I should have had the same intensities but shifted by 120° in each phase.

I saw that my first remarks made you ask some questions, so I took the liberty of sharing with you my observations and my misunderstanding following various simulations. I hope you can enlighten me in order to have a better understanding of the simulation of my circuit.

Thanks for your help.

Have a good day
Hello there,

There is something you should think about and understand about inductors and applied AC sinusoidal voltages.
Inductors 'expect' to have a certain current at a certain voltage phase angle. That is, in the steady state they will have a certain current at a certain time with the given applied AC voltage. In the beginning at the startup of a circuit, none of the inductors will have the right current when the AC voltage first turns on, and that is because all of the voltages are not at the right phase for the current to be zero through the inductor. 0 degrees is not right, 120 degrees is not right, and 240 degrees is not the right phase relative to the current that should be flowing through the inductor at that time.

This is an unusual thing i know, because you would think that all the currents should start at zero and then gradually build up to maximum. But that's not how it works because the inductor voltage is not at the right phase for the current to be zero. If you run a lone inductor (BTW of which you have three, it's just three single phase circuits at different angles) you can look at the current phase and the voltage phase after some long time and compare. The current will be 90 degrees out of phase with the voltage for the ideal inductor, and around that for a non-ideal inductor with some series resistance. BTW you were right about the added series resistor acting like the real life ESR of the inductor. Anyway, the 90 degree phase shift means that the only way to get smooth operation is to solve for the steady state current at that particular phase angle. This means that for 0 degrees it would be different than for 120 degrees and different yet for 240 degrees. Each current, in an ideal inductor, will be 90 degrees out of phase with THOSE phases. This is why using a cosine wave works better with an ideal inductor, because with an ideal inductor, that would be the solution to the voltage phase in steady state.
With a series resistor though, it will be different because the phase of the current will not be exactly 90 degrees anymore. With large resistance it can be much different, but with small resistance it will only be a little different than 90 degrees.
Since the current lags the voltage, you should see the current phase 90 degrees after the voltage phase with an ideal inductor, and slightly different with non-ideal inductors.

There is also the exponential part of the response that WBahn was talking about, and that looks like A*e^(-t*a) which takes time to damp out. Notice that the longer we wait with that expression the lower that value becomes, and when it gets low enough at that point the current is at the right phase for the inductor or inductor with resistor or whatever circuit it happens to be with the inductor in it and an AC sinusoidal forcing function.
The entire solution, without combining sine and cosine terms yet has this form:
iL=A*sin(w*t)+B*cos(w*t)+C*e^(-t*a)

and once some time has passed and we lose that exponential part, we get just a sinusoidal wave with a phase shift. If we set the voltage phase right from the start, we only have this:
iL=A*sin(w*t)+B*cos(w*t)

and that is just a sinusoidal wave with a phase shift:
iL=K*sin(w*t+ph)

You should just run one phase and see if you can understand that. What you really have there is three separate phases and although it may be balanced in reference to the line voltage it has a ground for all the loads so you can run one phase at a time to see how each phase works. You can vary the voltage phase setting of the sine source and see how the current behaves. This is easy to experiment with.

Also, setting the initial current to zero doesn't always help. That is because immediately after zero the current may still not be at the right phase angle relative to the voltage. That means right after zero time the current may do some strange things before it settles into steady state. Zero current is the right value for a cosine wave however, if it is an ideal inductor.

It's nice to see you doing some experiments with the simulator. You can learn a lot by doing that.
 
Top