Keyboard Shortcuts
Likes
- LTspice
- Messages
Search
Re: Dual Active bridge
¿ªÔÆÌåÓýYour inductor/transformer inductances are
probably too low. 11?H is only 2 ohms at 30 kHz. How did you
calculate them? Try 10 times higher values. You didn't mention
the error messages about the .MEAS statements. There are
probably other things wrong. On 2025-05-06 17:52, arhamishtiaq42 via
groups.io wrote:
--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
Re: Calculate average value of a waveform under specific conditions using .meas command
On Tue, May 6, 2025 at 01:03 PM, <ankitk.ace@...> wrote:
I'm very glad if it works!
It is not a problem to not want to upload a complete schematic and all the models - for whatever reason it may be.? But it would have helped if you could at least have shown us the .MEAS commands that failed.? It's a tantalizing way of saying, "It's broken, but it's a secret.? Now fix it."
?
Ideally, one can throw together simplified schematics that illustrate the problem you are trying to solve - but even that is not always possible.
?
Sorry.? I was reluctant to use pronouns, not knowing whether to say "his" or "hers" or maybe "theirs".? I hope I at least spelled it correctly. ?
Andy
? |
Re: Calculate average value of a waveform under specific conditions using .meas command
On Tue, May 6, 2025 at 10:11 PM, Andy I wrote:
Hello Andy, ?
Thank you again for participating in the thread.
Now I understand what you mean by inserting guard bands. Although it might be only 99.9% accurate it is a very clever solution and I accept this as a solution wholeheartedly. I am grateful for your answer. I am reluctant in sharing the simulation file alone (because it is unpublished work yet) and not the .meas statements. It is not my unwillingness, it is just that I was trying too many different iterations to somehow calculate at least for one segment, and so I did not document all the combinations of the attempts that I made. The tested events did happen, my foolishness I didn't record the negative/failed iterations. ?
With Regards, Ankit PS: That's a lot of ankits in your message. Lol. |
Re: Calculate average value of a waveform under specific conditions using .meas command
On Tue, May 6, 2025 at 09:33 AM, Tony Casey wrote:
Assuming you want to calculate the average inductor current:If I understand correctly, that would of course find the average inductor current over one complete cycle. ?
But Ankit wants to find the average voltage over three distinct time intervals, each of which is a portion of one cycle:
These three intervals are identified as t0-to-t1, t1-to-t2, and t2-to-t3??-- or as d1Ts, d2Ts, and d3Ts -- in the second photo that Ankit uploaded earlier today.
?
That is a little more challenging because one wants to identify the starting and ending times of each of the three semi-linear portion of the I(L) waveform, but there is some noise (ringing) which makes finding the exact corners challenging.
?
That is why I recommended adding guard bands.? Instead of looking for
? ? I(L_filter_DC)=0,
Ankit may want to test for
? ? I(L_filter_DC)=50m
or some other number (75mV, 200mV, ?mV) that is not exactly zero, but large enough to be unaffected by ringing.? Admittedly it requires Ankit to accept the errors caused by measuring over inexact time intervals.? I think it may be a necessary trade-off.
?
The mechanics of putting that into one or a collection of .MEAS commands is another matter.? Perhaps the syntax Ankit used was incorrect (but we may never know because of unwillingness to show the non-working .MEAS commands).? Or perhaps the tested events never happened.? Unfortunately, the error message can be the same in either case, making it challenging to diagnose.? Breaking it up into multiple .MEAS commands does help and you can see where it fails.
?
Andy
?
? |
Re: TI Battery Charger(BQ24610) and EFuse(TPS26636) ICs
On Tue, May 6, 2025 at 10:09 AM, <mahmood.fares1988@...> wrote:
Texas Instruments puts all their SPICE (PSpice and TINA-TI) models on the webpage for the part.? That is the place to look.? To be best of my knowledge, that is the only place to look for models of T.I.'s parts.
?
So, for the TPS26636, I Googled and then went to the webpage for that part:? That brought me to the family webpage for TPS2663x:
Then I scrolled down the page.? Look for the section "Design & Development".? To narrow down the search better (not needed, but this may help a little), also click "Design tools & simulation" which is below "Design & development".? All that does is eliminate the other sections on that webpage that do not include SPICE models.? Then scroll down, and - voila! - there is the PSpice model:
TPS2663 PSpice Transient Model (Rev. A)and download the file.
?
Yes, it says "TPS2663", but according to the datasheet, the actual part numbers have 5 digits so they are all TPS2663x where 'x' is a digit.? It includes the TPS26636.
?
All T.I. product pages work this way.? If T.I. has a PSpice model, or a TINA-TI model (which might actually be SPICE), or an HSPICE model, or a "generic" SPICE2 or SPICE3 model, it is right there on the product's webpage.? OK, there is a chance that T.I. might have a model hidden away where you can't find it except by asking them politely, but in my experience all their models are right there on their product webpages where they can be found and downloaded.
?
Instead of googling the SPICE model, google the product name.? Then look for the SPICE model on the webpage.? This works for T.I.? Unfortunately, it does not always work this nicely for all IC manufacturers.
?
Sometimes they (T.I.) tell you that a model is not encrypted.? But if it doesn't say, it might be either encrypted or not encrypted, and the only way to know for sure is to download it, open it, and look at it.? SPICE models are readable text (netlists).? Anything that looks like machine code is encrypted.
?
The encrypted model can of course be used in PSpice, even in the special "PSPICE-for-TI".? If it is encoded for PSpice, it can be used only in one form or another of PSpice.
?
Just for your information, there can be encrypted models for (at least) these simulators:
Each program's encryption is unique to that program only.
?
Andy
? |
Re: TI Battery Charger(BQ24610) and EFuse(TPS26636) ICs
Hi Mahmood,
Registering with TI is not very difficult if you have a business or university email address. You can then download the free version, PSPICE-FOR-TI, from the e-fuse product page. But do you really need to simulate the e-fuse? In the past, we used a few different types of these without simulation or issues. The only tricky thing is the fixed overvoltage protection of some TPS26636 variants (e.g. TPS26632), which prevents use at higher voltages. You could ask specific questions on the TI E2E? forum. The people there are very friendly (as they are on this forum). Sven. |
Re: CD4000 Library Additions
On Tue, May 6, 2025 at 02:13 AM, N4 wrote:
I will upload CD4026B and CD4033B. They will require the CD4000_v.lib library
?
I will also upload demo photo's for each. |
Re: TI Battery Charger(BQ24610) and EFuse(TPS26636) ICs
Thanks, Andy. If I may ask, where do you get access to their PSPICE models, as googling that always directs me to downloading the CADENCE PSPICE for TI software, and you have to apply for some sort of special license or something. Is there any where I can download the PSPICE models discretely? Apologies for the trivial request, but for some reason I can't find any source to these models. I understand the specific IC I want is encrypted, but I want the source to search for other ICs that may be non-encrypted. Thanks. |
Re: Calculate average value of a waveform under specific conditions using .meas command
¿ªÔÆÌåÓýOn 06/05/2025 15:04, ankitk.ace via
groups.io wrote:
Thank you for participating in this thread. If you look at the 2 images that I have posted in this album, I have to identify specific intervals and then do the operation, however, as there's ringing during the DCM stage I am unable to detect the exact time intervals where I have to perform the intended operation. Is there any intelligent way to automate this process?You should be able to figure that out from what I suggested. Assuming you want to calculate the average inductor current: .MEAS Imax max I(L_filter_dc) .MEAS Imin min I(L_filter_dc) .MEAS Imid param (Imax+Imin)/2 .MEAS Tstart when I(L_filter_dc)=Imid rise=2 .MEAS Tstop when I(L_filter_dc)=Imid rise=3 .MEAS Iavg avg I(L_filter_dc) from Tstart to Tstop Note: I haven't actually tested this, but it should work. Just try copy-paste straight into your schematic. If there's an error, you'll know which step failed. -- Regards, Tony |
Re: Calculate average value of a waveform under specific conditions using .meas command
¿ªÔÆÌåÓýWell, the practical principle is whether the
copyright owner would see it worthwhile to take legal action
over a SMALL extract from a copyright document, posted to a
closed forum. It would be quite another matter if the whole
document were put out on the public web. Copyright IS the legal
issue involved: the access fee is for a personal, restricted
licence. I am also not a lawyer, but it pays to know a little
bit about laws that affect you. On 2025-05-06 13:42, Andy I via
groups.io wrote:
--
Best wishes John Woodgate RAYLEIGH Essex OOO-Own Opinions Only If something is true: * as far as we know - it's science *for certain - it's mathematics *unquestionably - it's religion |
Re: Calculate average value of a waveform under specific conditions using .meas command
On Tue, May 6, 2025 at 08:44 AM, <ankitk.ace@...> wrote:
That is odd - because I can not find the same figure in the IEEE paper!? Did you copy that figure from a different paper than the one you referred to previously? ?
Not that it matters in the long run.? I am just confused because it was not copied from the same paper.
?
Andy
? |
Re: Calculate average value of a waveform under specific conditions using .meas command
On Tue, May 6, 2025 at 06:25 PM, Tony Casey wrote:
The .MEAS trig? targ? syntax may be elegant and efficient, but it is hard to debug. It's usually simpler, and much easier to debug, to split the trig and targ conditions into two separate meas tests, then add a third that uses the results from those, e.g.:Hello Tony, ?
Thank you for participating in this thread. If you look at the 2 images that I have posted in this album, I have to identify specific intervals and then do the operation, however, as there's ringing during the DCM stage I am unable to detect the exact time intervals where I have to perform the intended operation. Is there any intelligent way to automate this process? With Regards, Ankit |
Re: Calculate average value of a waveform under specific conditions using .meas command
On Tue, May 6, 2025 at 08:49 AM, <ankitk.ace@...> wrote:
No, I am suggesting that you may need to be "creative", and you might need to approximate. ?
If the ringing is the problem, then choose your waveform trigger points to avoid it.
?
Can you describe the trigger points you want by looking at the simulated waveforms?? If you can, then do your best to tell LTspice to do the same thing.
?
If there are other signals that are clean (free from ringing), consider using them instead.
?
Andy
? |
Re: Calculate average value of a waveform under specific conditions using .meas command
¿ªÔÆÌåÓýOn 06/05/2025 14:39, Andy I via
groups.io wrote:
This isn't right. You can only test for exactitudes with .MEAS, not inexactitudes. The .MEAS trig? targ? syntax may be elegant and efficient, but it is hard to debug. It's usually simpler, and much easier to debug, to split the trig and targ conditions into two separate meas tests, then add a third that uses the results from those, e.g.: .MEAS StartTime when V(out)=0 rise=1 td=100n .MEAS StopTime when V(out)=0 rise=2 td=100n .MEAS Vavg avg V(out) from StartTime to StopTime Here's 2 cents. -- Regards, Tony |
Re: TI Battery Charger(BQ24610) and EFuse(TPS26636) ICs
On Tue, May 6, 2025 at 08:20 AM, <mahmood.fares1988@...> wrote:
As you might have noticed, T.I. has an encrypted PSpice model for that part, but it is the only one they have for it.? It would be unusable in LTspice and can not be converted. ?
T.I. does not appear to have any SPICE model for the other part.
?
Maybe someone can come up with an alternative.
?
Andy
? |
Re: Calculate average value of a waveform under specific conditions using .meas command
On Tue, May 6, 2025 at 06:09 PM, Andy I wrote:
Hello Andy, ?
Thank you for replying again. So from your suggestion, does it mean I cannot automate the simulation?
Will I have to rely only on cursor for this? With Regards, Ankit |
Re: Calculate average value of a waveform under specific conditions using .meas command
Hello John,
?
Thank you for replying. I have uploaded a screenshot from the paper here. I just need help in identifying the three different states using .meas command and calculate the average values for a different variable during each state. With Regards, Ankit |