Capacitor Charging with Pulses

Thread Starter

JulesP

Joined Dec 7, 2018
458
Core losses and skin effect are not taken into account. View attachment 332419
Well done for getting that to work. I now need to translate all that to my version, in other words a crash course in extended Spice development. Did you use the FET model I provided or have you tinkered with your own? You only appear to have one coil at 318mH when in fact there are 3 of them in parallel so combined L = ~100mH R=~ 3.5 Ohms. I couldn’t find a symbol for a polarised cap either.

Plenty of other questions but will leave those for now.
 

Bordodynov

Joined May 20, 2015
3,431
Well done for getting that to work. I now need to translate all that to my version, in other words a crash course in extended Spice development. Did you use the FET model I provided or have you tinkered with your own? You only appear to have one coil at 318mH when in fact there are 3 of them in parallel so combined L = ~100mH R=~ 3.5 Ohms. I couldn’t find a symbol for a polarised cap either.

Plenty of other questions but will leave those for now.
It only seems to you that the inductance is wrong. In Qspice, inductance has a multiplier factor M like other components. I have set M=3, which means that three inductors are connected in parallel. I took the transistor model from your file.
Look for the symbol POLCAP.
 

Thread Starter

JulesP

Joined Dec 7, 2018
458
It only seems to you that the inductance is wrong. In Qspice, inductance has a multiplier factor M like other components. I have set M=3, which means that three inductors are connected in parallel. I took the transistor model from your file.
Look for the symbol POLCAP.
Oh yes I can see the ‘3’. A multiplier then. I can’t see POLCAP anywhere . . . Can you attach the asc file so I can open it in my Mac version?
 

Thread Starter

JulesP

Joined Dec 7, 2018
458
It's just that I did a print screen about POLCAP and didn't upload it.
And about inductance I showed the presence of M in LTspice as well.

View attachment 332430
Aha, you mean a polarised cap.

I have a whole host of queries as to why you have laid out the circuit the way you have and the meaning of the various directives. I will assemble a list of questions/points during the day and put in one post.
Can you also attach then .asc file for it so I can tinker and see if I can get the same outputs?
 

Thread Starter

JulesP

Joined Dec 7, 2018
458
After making a few small adjustments I have now got the pulses and a reasonable cap charging rate that is quite close to bench measurements.

Spike Ouput 1.png

Here are a couple of cap chargings for 1s and 5s.

Cap Charging 1s.png

Cap Charging 5s.png

If anyone can now guide me on how to do calculations with the graphical outputs for E supplied and E cap to derive efficiency?
 
Last edited:

Thread Starter

JulesP

Joined Dec 7, 2018
458
No, but then I would have to balance the time it would take to become familiar with it against the fairly intensive testing over the next 4 months to get the second paper out for publication by the start of the new year.

What can it do, without a masterclass training session, that Spice can't do? Bordodynov has shown that Spice can do the necessary calculations. Also, does it have a free version?
 

Danko

Joined Nov 22, 2017
2,169
If anyone can now guide me on how to do calculations with the graphical outputs for E supplied and E cap to derive efficiency?
LTspice XVII.
Energy, provided by V2 is 35.065 J.
Energy, consumed by C1 is 17.457 J.
Efficiency is (17.457/35.065)*100=49.785%.

1727350400996.png___1727350700177.png
ADDED:
Great, but that doesn't help me to do it myself.
Once I have plots from N001 and N004, how do I get the plots of the products of V*I and do I use a .meas command?
Study LTspice Help:

1727355030029.png

Without .meas:
1727356798117.png

To obtain integral energy window, Ctrl+click on plot label: 1727359399673.png
 
Last edited:

Thread Starter

JulesP

Joined Dec 7, 2018
458
Great, but that doesn't help me to do it myself.

Once I have plots from N001 and N004, how do I get the plots of the products of V*I and do I use a .meas command?
 

MrAl

Joined Jun 17, 2014
13,711
My aim is not to produce the highest efficiency but to know fairly accurately what the efficiency is. I have never complained about the efficiency but only sought to know how to determine it well enough.
The fractional efficiency is as:
Eff=PavgOut/PavgIn
where
PavgOut is the average power out, and
PavgIn is the average power in.
You can multiply Eff by 100 to get the percent efficiency.

Thus if PavgOut=9 and PavgIn=10 then Eff=0.90 which is 90 percent.

Sometimes current meters and volt meters are used to measure this, but you have to be careful if the levels are changing. Even though power is voltage times current, average power is the average of the volts times amps over one cycle.
It's defined as:
Pavg=(1/T)*integrate(v*i,t,0,T)
where
't' is time and
'T' is the period of one (repeating) cycle.

One way to do this if you have a scope is to look at small increments of time recording the levels encountered. You can then sum the levels times the times they occur and then divide by the period of the measurement T. You try to collect enough samples so that there is a smooth change in amplitude between samples, then you can use the equivalent of the Trapezoidal integration method where you use the average value of the amplitudes between two samples as the calculation points.
For example, if at times 0, 1, and 2 you measure 4, 6, and 8, the average between 4 and 6 is 5 and between 6 and 8 is 7,
there are 3 samples but only 2 averages, so sum the averages 5+7=12 and divide by 2 and get 6, and that's the average.
This worked out without dividing because the times were integers increasing by 1, but really you do it this way:
(s1*t1+s2*t2)/T
which for the averages would be:
(5*1+7*1)/T with T=2.
This would be the same as if we used smaller time increments:
(5*0.1+7*0.1/0.2=6

Also remember that each number above was the result of one current measurement times one voltage measurement, which is the instantaneous power for that sample.

It's not hard to perform this I've done it on much faster signals in order to estimate real life switching losses. You just have to be careful with each amplitude measurement and the times you obtained those measurements.

Note this is for the more complicated switching waveforms. With sine waves it's much simpler.

We can do a more advanced example if you like.
 

Thread Starter

JulesP

Joined Dec 7, 2018
458
Thanks for that. I'm fine with getting a physical measurement, and have talked about it earlier in this thread. My immediate aim here is to do so from my sim model which is now showing promise. Danko has also done from the model I uploaded it but I need to learn how to do it, presumably using .meas etc.
 

crutschow

Joined Mar 14, 2008
38,529
After a transient simulation, with the Alt key pressed, place the cursor over the component of interest and left click.
That will plot the instantaneous power for that component for the sim duration.

Ctrl-click of the plot title will give the total energy and average power for the duration.

1727358177961.png
 

crutschow

Joined Mar 14, 2008
38,529
Jolly handy! What about plotting the results of two multiplied values, as Danko has done? Thanks
Plot one of the values.
Then right-click on the trace name, which will bring up a window where you can enter the other variables, and the variable math you want to perform.

1727364261376.png
 
Top