¿ªÔÆÌåÓý


Re: Simulation of MMC 3-Level on Ltspice

 

Ich habe die ltspice-Datei unter dem Namen M2C single-phase SPWM112 auf Temp hochgeladen?


Re: Dual Active bridge

 

Alright, Anyone else who can help?


Help needed on simple examples to build an digital filter in LTspice with Vlad's filter models from the filters manual

 

Hi folks,
I am new in the forum and I think I have done already some real big magic in LTspice but now I struggle how I can add a chip internal digital filters after an ADC to my huge analog model of an automotive battery pack.
I am not interested in the involved 2MHz delta-sigma ADC function at all, there is an analog 100kHz AAF in front and the digital output is downsampled to 128us = ~8kHz, so this part is just working fine and flat in my frequency range, I just want to rebuild the two frequency lowpass filterings which are done digital inside an IC afterwards the ADC.
We are running them in matlab but I like to keep the huge analog model before that filters in LTSPICE.
I found Vlad's filter stuff but I am missing a simple example how to use it with my transfer function as I am beginner for digital filters and the complex examples on the filters manual seem to complex for my simple needs.

My needs are to rebuild two chip internal digital filters
?
1. digital PT1 Filter with 128us samples for LOWPASS 20Hz
K=2^(-N) ; N=6 -> K=1/64
?
Transferfunktion digital k / (1 ?- (1-k)*Z^(-1) ?)
?
AND
2. for a SINC FILTER with OSR=16 and 128us per sample
?
Transferfunktion digital 1/16 * (1-z^(-16)) / (1 - Z^(-1))

Can someone experienced add a model from the filter subs provided to my example simulation so that I can see how this is done and how it works and plot the output over frequency?
I started with an example I found via google from Helmut how to create the 128us delayed versions of my input sample (simple AC sinus)....it shows function on his OUT example but it does not execute my wanted transfer function on OUT2.
So either someone can fix my trial with the delayed voltages or show me how to use an already designed existing filter just with my simple coefficients?

I will uploaded .ASC and .PLT file zipped: "SINC Filter basic example needed.zip" to temp. (The provided filters.sub is not included, everyone should have it, same as for all the nice math.sub stuff I already use and love)


Simulation of MMC 3-Level on Ltspice

 

As part of my studies, I have to simulate a single-phase modular multilevel converter MMC (3-level) on Ltspice. I have already connected the circuit with two voltage sources of 20V each, two submodules (one upper and one lower). In the simulation I work with sine PWM, for this I have also used two carrier signals. The output voltage should be a stepped voltage between +20V and -20V and after the LC filter should be a clean sinusoidal voltage. But somehow I am not getting the desired results. (clean signals). Can someone help me. Thank you.?
?


Re: Calculate average value of a waveform under specific conditions using .meas command

 

¿ªÔÆÌåÓý

On 06/05/2025 18:41, Andy I via groups.io wrote:
On Tue, May 6, 2025 at 09:33 AM, Tony Casey wrote:
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
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:
  • The rising inductor current,
  • The falling inductor current,
  • The interval where the inductor current is zero.
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.
The screenshot caption simply states "Calculate average value of a waveform under specific conditions using .meas command". So that's what I did, assuming the interval was 1 cycle.

For finding a good estimate of the start and stop times of the transitions, the best method is to look for the highest and lowest values of the derivative of the repetitive waveform, and then find the time when (say) 98% of those values are achieved, to allow for inconsistent peaks (better with Tmax in the .TRAN directive) , e.g.

.MEAS MaxdV max d( I(L_filter_dc)) ; max +v derivative
.MEAS T1 when d( I(L_filter_dc))=0.98*MaxdV rise=1 ; start of 1st +ve transition
.MEAS MindV min d( I(L_filter_dc)) ; max -ve derivative
.MEAS T2 when d( I(L_filter_dc))=0.98*MindV fall=1 ; start of 1st -ve transition
.MEAS T3 when d( I(L_filter_dc))=0.98*MaxdV td=T2 rise=1 ; start 2nd +ve transition

Then find the averages of whatever intervals are required.

--
Regards,
Tony


Re: Dual Active bridge

 

¿ªÔÆÌåÓý

You have a huge inrush current due to the capacitors being fed from a zero-impedance source V9. Put 1 ohm in series with it. But the simulation still stalls without an error message after less than 1 ms. As far as I can see, your switching waveforms allow each pair of series FETs to be on together, briefly, which is not good. But there is something else that causes the simulation to stall, and I'm not an expert on these circuits.

On 2025-05-06 18:51, arhamishtiaq42 via groups.io wrote:
yes I've changed my inductance to 110us, 250us, 1us but current is still high around 40A. and it is steady
--
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

Virus-free.


Re: Dual Active bridge

 

I've updated my file with the name Dabnew.asc in TEMP folder kindly someone fix the current issue of my primary side transformer of DAB


Re: Dual Active bridge

 

yes I've changed my inductance to 110us, 250us, 1us but current is still high around 40A. and it is steady


Re: Dual Active bridge

 

¿ªÔÆÌåÓý

You can't change L1 without also changing L2, keeping their ratio constant. It would be OK to change L3 by the same factor. So try L1=110? L2=250? and L3=1?.? It doesn't make much sense to specify a very precise value for leakage inductance unless you know exactly how the transformer will be constructed.

On 2025-05-06 18:33, arhamishtiaq42 via groups.io wrote:
On Tue, May 6, 2025 at 10:16 AM, John Woodgate wrote:
dabhw4_new
Thanks for replying. i put 11us so it made my output 150 if i increase 11us to above it changes the output I've uploaded my file in TEMP with the name of dabhw4_new can you tell what should i do should i change mosfet ?
?
--
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

Virus-free.


Re: Dual Active bridge

 

On Tue, May 6, 2025 at 10:16 AM, John Woodgate wrote:
dabhw4_new
Thanks for replying. i put 11us so it made my output 150 if i increase 11us to above it changes the output I've uploaded my file in TEMP with the name of dabhw4_new can you tell what should i do should i change mosfet ?
?


Re: Calculate average value of a waveform under specific conditions using .meas command

 

On Tue, May 6, 2025 at 10:44 PM, Andy I wrote:
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."
Andy,
?
Understood. And that's a horrible mistake on my part. I am sorry about it.
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.
Not offending anyone. Old times were good and simple, not many were offended about a him/her/their. People have simplified/diversified/complicated matters for their own good. Homo sapiens have really come far. I am a he though.

With Regards,
Ankit


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:
I am making Dual active bridge (DAB converter) for my assignment . Power should be 500W , input is 100vdc and output should be 150 my output goal is complete but my current from primary side of transformer is very high it should be around 8A and now be steady kindly help me to fix this problem . I've attached my .asc file with the name of dabhw4_new.asc
--
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

Virus-free.


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:
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'm very glad if it works!

I am reluctant in sharing the simulation file alone (because it is unpublished work yet) and not the .meas statements. ...
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.
?
PS: That's a lot of ankits in your message. Lol.
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:
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:
  • The rising inductor current,
  • The falling inductor current,
  • The interval where the inductor current is zero.
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
?
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:

.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
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:
  • The rising inductor current,
  • The falling inductor current,
  • The interval where the inductor current is zero.
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

 
Edited

On Tue, May 6, 2025 at 10:09 AM, <mahmood.fares1988@...> wrote:
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.
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:
  • PSpice (including PSPICE-FOR-TI)
  • TINA (including TINA-TI)
  • HSPICE
  • LTspice
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:
Which brings me back to the original post here and @eetech00, who has offered to share these symbols as they were, and seem to still not be part of the libs available for download.?
?
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

 

Hello Tony,

Thank you for providing a workaround. I will try to play with these directives to see how I may reach my desired goal.

With Regards,
Ankit