开云体育

Date

Re: Periodic signal from PWL file

 

开云体育

That’s what I was initially thinking of (and also posted it). What you are mentioning is BNF (Backus-Naur form of descripion of higler level programming language syntax).

Only I was missing the left part of the or-sign in the Wiki. Maybe there were meant to be time/value tuples in angle brackets and they were fallen victim to the HTML conversion?


Christoph


Am 08.07.2023 um 20:43 schrieb Donald H Locker via <dhlocker@...>:

That is a "logical OR"? separating two optional forms of the command or of a command's parameters.

There is a formal mechanism for language specification (whose name I can't remember despite using is so many times for so long...).

If I manage to remember, I'll toss it your way.

Donald.

On 2023-07-08 11:56, Christoph wrote:
Fine so far, but using the | (vertical bar) gives an error.

PWL REPEAT FOREVER (file=Z:\Users\kuku\Documents\LTspiceXVII\pulses.txt) ENDREPEAT works, while
PWL REPEAT FOREVER (| file=Z:\Users\kuku\Documents\LTspiceXVII\pulses.txt) ENDREPEAT

doesn’t So what is the purpose of the ?|‘?

Christoph

Am 08.07.2023 um 17:52 schrieb John Woodgate <jmw@...>:

If you look at the other examples on that page, you will see that the | character is only used with a file, not with a sequence of numbers.

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-08 16:40, Christoph wrote:
Thanks. This worked. Though the ?|‘ symbol (pipe) is confusing. If it designates that the data is supposed to be piped from the file, it doesn’t work. OTOH, should it mean an ?or“, then the empty left side of the ?|‘ shouldn’t be empty but contain a
list of <time><value> pairs.

Christoph



Am 08.07.2023 um 15:11 schrieb John Woodgate <jmw@...>:

There is an undocumented REPEAT feature in the Wiki at: /g/LTspice/wiki/13810

A list of data points or a file reference can be repeated a fixed amount of times <n>, or forever

PWL REPEAT FOR <n> (|<file spec>) ENDREPEAT
PWL REPEAT FOREVER (|<file spec>) ENDREPEAT

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-08 13:51, Christoph wrote:
I have created  a pulse source from a PWL file.
It‘s 32 samples of a signal.

Is it possible to make this pulse train periodic?

Or do I have to provide the pulse samples for every period by the PWL file?

—
Christoph




Re: Warning: Multiple definitions of model ...

 
Edited

Alexander Bordodynov's greatly expanded standard.xxx libraries have been available for years. Alex is a highly valued member of the group. I don't know the provenance of the models in his collection, but I know it includes lots of Russian devices that many of us probably can't obtain. A minority users have stated they use them. Good luck to them. But when it comes to fielding questions related to models they have got from there but have forgotten they did so, what are we supposed to do?

Collections of models uploaded to the group's files section are welcome. Even better when they have some sort of traceability or QA. People can use them in the usual 3rd party mode, with the usual proviso of caveat emptor.

The ideal situation is that ADI have dozens of testers validating thousands of models that we can trust. That's not the reality. I recently uploaded a MOSFET model that I developed from the datasheet. I provided a report that compared the model's output to the datasheet. People can make up their own minds about that. It took me about a day to do it, and I have a set of prepared jigs and spreadsheets that have evolved over the years. On that basis it would take me over 5 years to validate 1875 BJT models if I didn't have anything else to do.

But... we don't need 1875 BJTs. Most likely, many of them are not even available any more. Many devices are so similar that in 98% of cases, they are completely interchangeable. We don't need 10 devices that are essentially the same. But some are not. There are few alternatives to the Onsemi ring emitter high power audio BJTs, especially the ThermalTrak ones, for example. Sadly, they aren't in the standard library. You can download them from Onsemi. You can also download a sub-set of those (and others) from Bob Cordell's website, that he produced to address supposed deficiencies in the models from Onsemi - you can get those . Bob is a highly respected audio designer, but as far as I know neither he nor Onsemi have published any quality control documents on the efficacy of said models. Instead, there are usually disclaimers (from manufacturers) to not rely on them. Say what? Some people often say you can't trust simulations -? that you must build and test every circuit. Maybe they're right on that basis. I guess when Intel introduce a new processor with 10 billion transistors, they have previously made a dozen or so cut'n'strap breadboards to prove it works.

As far as I can tell, ADI are not validating discrete devices for the standard.xx libraries. Instead there are periodic announcements of xxx devices kindly contributed by XYZ Semiconductor Corporation. But when we check (I mean "I"), these are not always the same as those directly available from the original producer's website. In the case of the JFETs, we must therefore conclude they have been mangled by ADI in the process of translation to the standard library file format.

As far as I'm concerned, I would rather have 100 models I can trust, rather than a 1000 that I can't. At the moment, it seems, we don't have either.

--
Regards,
Tony


On 10/07/2023 00:05, John Woodgate wrote:

Some valid points, but I think the proposal is not 'either/or'. I see no objection to putting the expanded files in a new subfolder of Files, as long as it has a warning about how to use it and not use it.

Not everyone has Tony's skills in verifying a model. Some of us need more support.


Re: Warning: Multiple definitions of model ...

 

开云体育

Some valid points, but I think the proposal is not 'either/or'. I see no objection to putting the expanded files in a new subfolder of Files, as long as it has a warning about how to use it and not use it.

Not everyone has Tony's skills in verifying a model. Some of us need more support.

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-09 22:02, Tony Casey wrote:

I'm not against a repository of models - we already have one in the group 's Files section. But I am against trying usurp the standard libraries.
Most people coming to this group, at least initially, will have only the installation files.
Once people have learnt to deal with 3rd party models, they can use what they want.
We have had endless issues over the years with people adding extra models to the standard libraries and then wondering why no one can run their problematic schematics, when they believe they have uploaded everything necessary.
Many of us of us are not satisfied with ADI's chaotic recent efforts with the standard libraries, but the solution is not additional chaos. Although this is a big group, it still only represents a fraction of the LTspice user base.
We may not like the current situation, but we need to concentrate on enabling people to use LTspice despite the current issues, by freeing them from the initial dependency on the standard libraries.
ADI's current preoccupation is making sure that their own example schematics run with what is what is currently in the standard libraries. That is where they see the critical value-added issues.
People complaining about multiple BC848s are way down in the noise, because they are probably not buying lots of ADI's premium products. For heaven's sake, even the multiple BC848s issue is trivial compared to the dozens of JFETs in that library that have massively faulty models.
If anything, I think emphasis ought to be on educating users to validate whatever models they are using. Quality trumps quantity. What's the value in having 1875 BJT models that have little to zero provenance? Have you validated any of them?
German Ergueta is right when he says that validation is a time consuming issue. I'd like to think that's because he has lots of people validating things. He probably does - just not the standard libraries.
Could we do a better job? Possibly. But who's going to do the heavy lifting?? And not get paid for doing it. And would it have a global impact? No.

--
Regards,
Tony?

On 9 Jul 2023 20:21, eewiz <eewiz@...> wrote:
Hello All,

Members could maintain a set of the standard.xxx files for use by the group.
I've been doing that for many years now.
If the group retained a set of maintained files in an easy to reach repository similar to /files/temp, group members could downloaded them when needed to replace the LTspice versions that appear after an LTspice update.
I have a set of standard.xxx files that I have maintained across LTspice updates since LTspice IV was all the rage.
?????????????????????? ? ?? # OF DEVICES
FILE??????????????? MAINTAINED? LTspice
standard.bjt?? ? ? ?? 1875 ?????? ?? 306
standard.dio???????? 2575 ?????? ?? 928
standard.jft ? ?????? 1306??????????? 140
standard.mos????? 1710????????? 1207
The library files could be kept in a single zip that could be easily dropped onto the \cmp directory to clobber the undesirable LTspice official standard.xxx files after an LTspice update.
Of course there are no guaranties of model quality from anyone including the author of LTspice but, I much prefer having 1875 BJT models to choose from as opposed to the 306 model provided by AD.
The paradigm could then be changed from "missing BJT model, be sure to include your model in your working directory" to "Missing BJT model, be sure to download the set of standard.xxx files from the group."
Then group members could leave the substandard standard.xxx files to suffer the rest of the world.

If I knew anything about PC programming, I would write something to move the maintained files out of the way, call LTspice into update mode, combine any new devices into the maintained files and finally overwrite the downloaded LTspice files.
But, I don't. I write embedded system code in assembler and C, where I get to roll all my own code.
I have no idea how to deal with calling a zillion pieces of somebody else's code to piece together a PC program.
So I just maintain my own copies of the standard.xxx files that I process in a text editor.
Back in the 90's I used to easily accomplished such tasks with dBase/Clipper but that capability disappeared for me when M$ abandoned 16-bit software altogether.

All for now


Re: Warning: Multiple definitions of model ...

 

I'm not against a repository of models - we already have one in the group 's Files section. But I am against trying usurp the standard libraries.
Most people coming to this group, at least initially, will have only the installation files.
Once people have learnt to deal with 3rd party models, they can use what they want.
We have had endless issues over the years with people adding extra models to the standard libraries and then wondering why no one can run their problematic schematics, when they believe they have uploaded everything necessary.
Many of us of us are not satisfied with ADI's chaotic recent efforts with the standard libraries, but the solution is not additional chaos. Although this is a big group, it still only represents a fraction of the LTspice user base.
We may not like the current situation, but we need to concentrate on enabling people to use LTspice despite the current issues, by freeing them from the initial dependency on the standard libraries.
ADI's current preoccupation is making sure that their own example schematics run with what is what is currently in the standard libraries. That is where they see the critical value-added issues.
People complaining about multiple BC848s are way down in the noise, because they are probably not buying lots of ADI's premium products. For heaven's sake, even the multiple BC848s issue is trivial compared to the dozens of JFETs in that library that have massively faulty models.
If anything, I think emphasis ought to be on educating users to validate whatever models they are using. Quality trumps quantity. What's the value in having 1875 BJT models that have little to zero provenance? Have you validated any of them?
German Ergueta is right when he says that validation is a time consuming issue. I'd like to think that's because he has lots of people validating things. He probably does - just not the standard libraries.
Could we do a better job? Possibly. But who's going to do the heavy lifting?? And not get paid for doing it. And would it have a global impact? No.

--
Regards,
Tony?

On 9 Jul 2023 20:21, eewiz <eewiz@...> wrote:
Hello All,

Members could maintain a set of the standard.xxx files for use by the group.
I've been doing that for many years now.
If the group retained a set of maintained files in an easy to reach repository similar to /files/temp, group members could downloaded them when needed to replace the LTspice versions that appear after an LTspice update.
I have a set of standard.xxx files that I have maintained across LTspice updates since LTspice IV was all the rage.
?????????????????????? ? ?? # OF DEVICES
FILE??????????????? MAINTAINED? LTspice
standard.bjt?? ? ? ?? 1875 ?????? ?? 306
standard.dio???????? 2575 ?????? ?? 928
standard.jft ? ?????? 1306??????????? 140
standard.mos????? 1710????????? 1207
The library files could be kept in a single zip that could be easily dropped onto the \cmp directory to clobber the undesirable LTspice official standard.xxx files after an LTspice update.
Of course there are no guaranties of model quality from anyone including the author of LTspice but, I much prefer having 1875 BJT models to choose from as opposed to the 306 model provided by AD.
The paradigm could then be changed from "missing BJT model, be sure to include your model in your working directory" to "Missing BJT model, be sure to download the set of standard.xxx files from the group."
Then group members could leave the substandard standard.xxx files to suffer the rest of the world.

If I knew anything about PC programming, I would write something to move the maintained files out of the way, call LTspice into update mode, combine any new devices into the maintained files and finally overwrite the downloaded LTspice files.
But, I don't. I write embedded system code in assembler and C, where I get to roll all my own code.
I have no idea how to deal with calling a zillion pieces of somebody else's code to piece together a PC program.
So I just maintain my own copies of the standard.xxx files that I process in a text editor.
Back in the 90's I used to easily accomplished such tasks with dBase/Clipper but that capability disappeared for me when M$ abandoned 16-bit software altogether.

All for now


Re: Warning: Multiple definitions of model ...

 

开云体育

It sounds a very good idea, but keeping the same filenames could cause untold confusion. Is there any way of making the names different?? The only thing I can think of is making them all upper-case, i.e. STANDARD.BJT etc., which humans see as different but LTspice doesn't.

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-09 19:21, eewiz wrote:

Hello All,

Members could maintain a set of the standard.xxx files for use by the group.
I've been doing that for many years now.
If the group retained a set of maintained files in an easy to reach repository similar to /files/temp, group members could downloaded them when needed to replace the LTspice versions that appear after an LTspice update.
I have a set of standard.xxx files that I have maintained across LTspice updates since LTspice IV was all the rage.
?????????????????????? ? ?? # OF DEVICES
FILE??????????????? MAINTAINED? LTspice
standard.bjt?? ? ? ?? 1875 ?????? ?? 306
standard.dio???????? 2575 ?????? ?? 928
standard.jft ? ?????? 1306??????????? 140
standard.mos????? 1710????????? 1207
The library files could be kept in a single zip that could be easily dropped onto the \cmp directory to clobber the undesirable LTspice official standard.xxx files after an LTspice update.
Of course there are no guaranties of model quality from anyone including the author of LTspice but, I much prefer having 1875 BJT models to choose from as opposed to the 306 model provided by AD.
The paradigm could then be changed from "missing BJT model, be sure to include your model in your working directory" to "Missing BJT model, be sure to download the set of standard.xxx files from the group."
Then group members could leave the substandard standard.xxx files to suffer the rest of the world.

If I knew anything about PC programming, I would write something to move the maintained files out of the way, call LTspice into update mode, combine any new devices into the maintained files and finally overwrite the downloaded LTspice files.
But, I don't. I write embedded system code in assembler and C, where I get to roll all my own code.
I have no idea how to deal with calling a zillion pieces of somebody else's code to piece together a PC program.
So I just maintain my own copies of the standard.xxx files that I process in a text editor.
Back in the 90's I used to easily accomplished such tasks with dBase/Clipper but that capability disappeared for me when M$ abandoned 16-bit software altogether.

All for now


Re: Warning: Multiple definitions of model ...

 

开云体育

Hello All,

Members could maintain a set of the standard.xxx files for use by the group.
I've been doing that for many years now.
If the group retained a set of maintained files in an easy to reach repository similar to /files/temp, group members could downloaded them when needed to replace the LTspice versions that appear after an LTspice update.
I have a set of standard.xxx files that I have maintained across LTspice updates since LTspice IV was all the rage.
?????????????????????? ? ?? # OF DEVICES
FILE??????????????? MAINTAINED? LTspice
standard.bjt?? ? ? ?? 1875 ?????? ?? 306
standard.dio???????? 2575 ?????? ?? 928
standard.jft ? ?????? 1306??????????? 140
standard.mos????? 1710????????? 1207
The library files could be kept in a single zip that could be easily dropped onto the \cmp directory to clobber the undesirable LTspice official standard.xxx files after an LTspice update.
Of course there are no guaranties of model quality from anyone including the author of LTspice but, I much prefer having 1875 BJT models to choose from as opposed to the 306 model provided by AD.
The paradigm could then be changed from "missing BJT model, be sure to include your model in your working directory" to "Missing BJT model, be sure to download the set of standard.xxx files from the group."
Then group members could leave the substandard standard.xxx files to suffer the rest of the world.

If I knew anything about PC programming, I would write something to move the maintained files out of the way, call LTspice into update mode, combine any new devices into the maintained files and finally overwrite the downloaded LTspice files.
But, I don't. I write embedded system code in assembler and C, where I get to roll all my own code.
I have no idea how to deal with calling a zillion pieces of somebody else's code to piece together a PC program.
So I just maintain my own copies of the standard.xxx files that I process in a text editor.
Back in the 90's I used to easily accomplished such tasks with dBase/Clipper but that capability disappeared for me when M$ abandoned 16-bit software altogether.

All for now


Re: Warning: Multiple definitions of model ...

 

开云体育

Output is engraved on stone tablets.

======================================================================================
Best wishes John Woodgate OOO-Own Opinions Only

Rayleigh, Essex UK

I hear, and I forget. I see, and I remember. I do, and I understand. Xunzi (340 - 245 BC)


On 2023-07-09 16:07, cander shelter via groups.io wrote:

There is also?

JSPICE

"JSPICE is a simulator for superconductor and semiconductor circuits, and is based on the general-purpose circuit simulation program SPICE2; it is incorporated with the Josephson junction model. It supports the same SPICE2 format and is running in the batch mode. Like SPICE2, it has ASCII plotting facility built in.?

The simulator is only valid for transient simulations and DC operating point; AC small-signal analyses are not allowed."








On Sunday, July 9, 2023, 6:57:47 PM GMT+4, Christopher Paul <christopherrpaul1@...> wrote:


On Sat, Jul 8, 2023 at 10:15 AM, Andy I wrote:

Andy
I wonder if it might be worth the while of those of us concerned about Analog Device's inaction in these matters to take to social media to suggest alternatives to LTSpice. With apologies to Arlo Guthrie and his "Alice's Restaurant" and the Wikipedia site I pulled this from,

"He predicts that a single person doing it would be rejected as "sick" and that two people doing it, in harmony, would be rejected as??"", but that once three people started doing it they would begin to suspect "an organization" and 50 people a day would be recognized as??a movement."

Thoughts?


Re: Warning: Multiple definitions of model ...

 

There is also?

JSPICE

"JSPICE is a simulator for superconductor and semiconductor circuits, and is based on the general-purpose circuit simulation program SPICE2; it is incorporated with the Josephson junction model. It supports the same SPICE2 format and is running in the batch mode. Like SPICE2, it has ASCII plotting facility built in.?

The simulator is only valid for transient simulations and DC operating point; AC small-signal analyses are not allowed."








On Sunday, July 9, 2023, 6:57:47 PM GMT+4, Christopher Paul <christopherrpaul1@...> wrote:


On Sat, Jul 8, 2023 at 10:15 AM, Andy I wrote:

Andy
I wonder if it might be worth the while of those of us concerned about Analog Device's inaction in these matters to take to social media to suggest alternatives to LTSpice. With apologies to Arlo Guthrie and his "Alice's Restaurant" and the Wikipedia site I pulled this from,

"He predicts that a single person doing it would be rejected as "sick" and that two people doing it, in harmony, would be rejected as??"", but that once three people started doing it they would begin to suspect "an organization" and 50 people a day would be recognized as??a movement."

Thoughts?


Re: Warning: Multiple definitions of model ...

 

On Sat, Jul 8, 2023 at 10:15 AM, Andy I wrote:

Andy
I wonder if it might be worth the while of those of us concerned about Analog Device's inaction in these matters to take to social media to suggest alternatives to LTSpice. With apologies to Arlo Guthrie and his "Alice's Restaurant" and the Wikipedia site I pulled this from,

"He predicts that a single person doing it would be rejected as "sick" and that two people doing it, in harmony, would be rejected as??"", but that once three people started doing it they would begin to suspect "an organization" and 50 people a day would be recognized as??a movement."

Thoughts?


Re: I am unable to add and use the BS138 (BSS138) model for simulation Iin LTSpice. can anyone help me with this

 

开云体育

I have uploaded an LTspice VDMOS model for the Onsemi BSS138.

The uploaded zip includes a model validation report that compares the key testjig simulation results to the Onsemi datasheet graphs.

--
Regards,
Tony


Re: PWL sources (was but not related to: "Discrete data points in plot view")

 

开云体育

Dave,

Of course he was, although I find it more instructive to show someone how it does work, rather than explaining how or why some other example does not work.

All for now


-----Original Message-----
From: dave.bell@...
Sent: Sun, 9 Jul 2023 03:52:52 +0000
To: [email protected]
Subject: Re: [LTspice] Discrete data points in plot view

eewiz, I think Bonkers was mixing absolute timing with relative timing notation.

If you delete all of the + signs at the beginning of the lines, it makes pretty good sense, as absolute times.

?

It took me a long time to get it through my head that relative time notation made the job a lot easier!


Dave

?

From: [email protected] <[email protected]> On Behalf Of eewiz
Sent: Saturday, July 08, 2023 6:34 PM
To: [email protected]
Subject: EXTERNAL: Re: [LTspice] Discrete data points in plot view

?

Hello Christoph,

?

Bonkers may be leading you down the primrose path.

If you follow Bonkers' advice the length of bit[1] will be twice the length of bit[0] and the length of bit[2] will be three times the length of bit[0].

The slew rate will also progress to 2 times and then 3 times longer...

?

This is all you need to make a PWL file with relative timing.

0??? 0?????????????? at 0 time its 0 volts.
+750n??? 10 ??? take 750ns to go from 0V to 10V with a linear slope.
+100u??? 10???? stay at 10V for 100us.
+1.5u??? -10???? take 1.5us to go from 10V to -10V with a linear slope.
+58u??? -10????? stay at -10V for 58us.
+1.5u??? 10????? take 1.5us to go from -10V to 10V with a linear slope.
+100u??? 10???? stay at 10V for 100us.

Rinse and Repeat...

?

If you would prefer to work with parameters instead of numbers, be my guest.

It took me just several minutes to copy and past what I needed in Excel to create a file that's 14,582 lines long.

As I made it, I made some changes to add some discontinuities on a periodic basis and then paste, paste, paste some more.

My file runs for about 583ms.

If I had known of the REPEAT syntax at the time, I could have made use of it but, cut and paste is easy, LTspice syntax is not.

?

Bonkers wrote:

Hi Christoph,?

Firstly, you can easily repeat cycles of your 32 points, even just using Notepad, if you adopt the +xxx option for the timestamp (relative timing).?
Secondly, PWL means it is linearly interpolated between the defined points.? If you want "crisp" edges, then you need excel, or libreoffice calc, or whatever.?
Essentially you need 2 PWL values per point, to get nice square data.?
The time deltas are normally just 2 values - bit period, and slew time.?
so, to make a datastream, like "101" :?

time? ? ? ? ? ? ? ? ? ? ? value
0? ? ? ? ? ? ? ? ? ? ? ? ? ?0
+tslew? ? ? ? ? ? ? ? ? ?bit[0] say 5V
+tbit? ? ? ? ? ? ? ? ? ? ? same
+tbit+tslew? ? ? ? ? ? bit[1] say 0V?
+2x tbit? ? ? ? ? ? ? ? ? same
+2x tbit +tslew? ? ? bit[2] say 5V
+ 3x tbit? ? ? ? ? ? ? ? ?same
+ 3x tbit? +tslew? ? ?next bit
...
etcetera.?
really easy to do in a spreadsheet, then select the 2 columns, paste to notepad, save as PWL.

All for now


Re: PWL sources (was but not related to: "Discrete data points in plot view")

 

开云体育

eewiz, I think Bonkers was mixing absolute timing with relative timing notation.

If you delete all of the + signs at the beginning of the lines, it makes pretty good sense, as absolute times.

?

It took me a long time to get it through my head that relative time notation made the job a lot easier!


Dave

?

From: [email protected] <[email protected]> On Behalf Of eewiz
Sent: Saturday, July 08, 2023 6:34 PM
To: [email protected]
Subject: EXTERNAL: Re: [LTspice] Discrete data points in plot view

?

Hello Christoph,

?

Bonkers may be leading you down the primrose path.

If you follow Bonkers' advice the length of bit[1] will be twice the length of bit[0] and the length of bit[2] will be three times the length of bit[0].

The slew rate will also progress to 2 times and then 3 times longer...

?

This is all you need to make a PWL file with relative timing.

0??? 0?????????????? at 0 time its 0 volts.
+750n??? 10 ??? take 750ns to go from 0V to 10V with a linear slope.
+100u??? 10???? stay at 10V for 100us.
+1.5u??? -10???? take 1.5us to go from 10V to -10V with a linear slope.
+58u??? -10????? stay at -10V for 58us.
+1.5u??? 10????? take 1.5us to go from -10V to 10V with a linear slope.
+100u??? 10???? stay at 10V for 100us.

Rinse and Repeat...

?

If you would prefer to work with parameters instead of numbers, be my guest.

It took me just several minutes to copy and past what I needed in Excel to create a file that's 14,582 lines long.

As I made it, I made some changes to add some discontinuities on a periodic basis and then paste, paste, paste some more.

My file runs for about 583ms.

If I had known of the REPEAT syntax at the time, I could have made use of it but, cut and paste is easy, LTspice syntax is not.

?

Bonkers wrote:

Hi Christoph,?

Firstly, you can easily repeat cycles of your 32 points, even just using Notepad, if you adopt the +xxx option for the timestamp (relative timing).?
Secondly, PWL means it is linearly interpolated between the defined points.? If you want "crisp" edges, then you need excel, or libreoffice calc, or whatever.?
Essentially you need 2 PWL values per point, to get nice square data.?
The time deltas are normally just 2 values - bit period, and slew time.?
so, to make a datastream, like "101" :?

time? ? ? ? ? ? ? ? ? ? ? value
0? ? ? ? ? ? ? ? ? ? ? ? ? ?0
+tslew? ? ? ? ? ? ? ? ? ?bit[0] say 5V
+tbit? ? ? ? ? ? ? ? ? ? ? same
+tbit+tslew? ? ? ? ? ? bit[1] say 0V?
+2x tbit? ? ? ? ? ? ? ? ? same
+2x tbit +tslew? ? ? bit[2] say 5V
+ 3x tbit? ? ? ? ? ? ? ? ?same
+ 3x tbit? +tslew? ? ?next bit
...
etcetera.?
really easy to do in a spreadsheet, then select the 2 columns, paste to notepad, save as PWL.

All for now


Re: PWL sources (was but not related to: "Discrete data points in plot view")

 

开云体育

Hello Christoph,

Bonkers may be leading you down the primrose path.
If you follow Bonkers' advice the length of bit[1] will be twice the length of bit[0] and the length of bit[2] will be three times the length of bit[0].
The slew rate will also progress to 2 times and then 3 times longer...

This is all you need to make a PWL file with relative timing.
0??? 0?????????????? at 0 time its 0 volts.
+750n??? 10 ??? take 750ns to go from 0V to 10V with a linear slope.
+100u??? 10???? stay at 10V for 100us.
+1.5u??? -10???? take 1.5us to go from 10V to -10V with a linear slope.
+58u??? -10????? stay at -10V for 58us.
+1.5u??? 10????? take 1.5us to go from -10V to 10V with a linear slope.
+100u??? 10???? stay at 10V for 100us.
Rinse and Repeat...

If you would prefer to work with parameters instead of numbers, be my guest.
It took me just several minutes to copy and past what I needed in Excel to create a file that's 14,582 lines long.
As I made it, I made some changes to add some discontinuities on a periodic basis and then paste, paste, paste some more.
My file runs for about 583ms.
If I had known of the REPEAT syntax at the time, I could have made use of it but, cut and paste is easy, LTspice syntax is not.

Bonkers wrote:
Hi Christoph,?
Firstly, you can easily repeat cycles of your 32 points, even just using Notepad, if you adopt the +xxx option for the timestamp (relative timing).?
Secondly, PWL means it is linearly interpolated between the defined points.? If you want "crisp" edges, then you need excel, or libreoffice calc, or whatever.?
Essentially you need 2 PWL values per point, to get nice square data.?
The time deltas are normally just 2 values - bit period, and slew time.?
so, to make a datastream, like "101" :?

time? ? ? ? ? ? ? ? ? ? ? value
0? ? ? ? ? ? ? ? ? ? ? ? ? ?0
+tslew? ? ? ? ? ? ? ? ? ?bit[0] say 5V
+tbit? ? ? ? ? ? ? ? ? ? ? same
+tbit+tslew? ? ? ? ? ? bit[1] say 0V?
+2x tbit? ? ? ? ? ? ? ? ? same
+2x tbit +tslew? ? ? bit[2] say 5V
+ 3x tbit? ? ? ? ? ? ? ? ?same
+ 3x tbit? +tslew? ? ?next bit
...
etcetera.?
really easy to do in a spreadsheet, then select the 2 columns, paste to notepad, save as PWL.
All for now


Re: Push-Pull 3-Winding Transformer Model Acting as LPF too?

 

Kerim, can you simplify your 2-winding transformer model a little?? Having an ideal transformer at its core, I think you can "push" the other elements through it to the other side and combine them.? Then can't you apply it to your 3-winding transformer too?

Andy


Re: Push-Pull 3-Winding Transformer Model Acting as LPF too?

 

OT:

Obviously, implementing the push-pull topology is much easier than the bridge one. But this has a price:

[1] The amplitude of the driving PWM voltage is doubled. It is from Vbat to –Vbat instead of Vbat to 0 or -Vbat to 0 in case of the bridge.

[2] The PWM resolution is halved. Its duty cycle is 50% for the zero voltage output, while it is 0% in case of the bridge.

[3] The resistance of the low-voltage side (primary?) is doubled (by splitting the primary 1-winding to 2 windings that take the same space).


Re: Push-Pull 3-Winding Transformer Model Acting as LPF too?

 

On Sat, Jul 8, 2023 at 11:22 PM, John Woodgate wrote:

Present: far too much stuff not relevant to the question of the transformer acting as a low-pass filter.

Kerim, if you accept that a two-winding transformer acts as a low-pass filter, you should be able to see that the presence of a third winding doesn't change that.? The leakage inductance and the load resistance are still there, as for the two-winding transformer.

Although I added a load, the new 3-winding model needs to act as LPF even without it, as in the case of the 2-winding one. I am afraid that with an open output, any leakage inductance cannot filter out the high frequency.
Did you see my humble solution on the subcircuit schematic of my 2-winding transformer, 'SineXF_lk__01_HY_'?


Re: Push-Pull 3-Winding Transformer Model Acting as LPF too?

 

On Sun, Jul 9, 2023 at 12:05 AM, Jerry Lee Marcel wrote:
The 74HC model is missing.
Sorry, I uploaded it too.


Re: Push-Pull 3-Winding Transformer Model Acting as LPF too?

 

On Sat, Jul 8, 2023 at 11:30 PM, Andy I wrote:
Kerim,

But your 3-winding transformer:
  1. is really just a 2-winding transformer but with a center-tapped primary (does that matter?);
  2. is "perfect", with no leakage inductance.

If the leakage inductance is responsible for the transformer's low-pass filtering, the 3-winding transformer lacks any.? What did you do to it when tweaking it to act as an LPF?? You did not leave your tweaks on the schematic, right?

Andy
Andy,

You are right in all you said.
I was somehow shy to upload what I tried doing because their responses were rather ridiculous :(
So, I uploaded the schematic with a conventional 3-winding transformer so that it could be replaced with a practical model and tested.

Kerim


Re: Push-Pull 3-Winding Transformer Model Acting as LPF too?

 

开云体育

The 74HC model is missing.

Le 08/07/2023 à 21:03, Kerim via groups.io a écrit?:

Hello,

Please find the uploaded two schematics in ‘PureSineInv.zip’:

[1] Sinewave inverter using a bridge to drive a two-winding linear transformer with no load and whose model include somehow its parasite LPF elements.

[2] Sinewave inverter using a push-pull drive for three-winding linear transformer (loaded) whose model doesn’t include its parasite LPF elements.


In vain, I tried tweaking the three-winding linear transformer to let it act as a LPF as done on the schematic [1].


I hope that someone can do it for me in any possible way or notify me that it cannot be done, at least for LTspice.

Your help will be much appreciated.


(In these days, I cannot afford building a push-pull inverter and its 3-winding transformer, even for 500W only, to find out that the PWM high frequency, about 16 KHz (Tpwm=64us), cannot be filtered out as it was done in the case of the full-bridge.)??

?

Best Regards,

Kerim


Re: Push-Pull 3-Winding Transformer Model Acting as LPF too?

 

Kerim,

But your 3-winding transformer:
  1. is really just a 2-winding transformer but with a center-tapped primary (does that matter?);
  2. is "perfect", with no leakage inductance.

If the leakage inductance is responsible for the transformer's low-pass filtering, the 3-winding transformer lacks any.? What did you do to it when tweaking it to act as an LPF?? You did not leave your tweaks on the schematic, right?

Andy