Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
- LTspice
- Messages
Search
Re: Sine modulated PWM voltage source (PWL file=xxx)
I'm having internet connectivity problems. Resorting to my cell phone but cannot upload anything right now.
toggle quoted message
Show quoted text
I'm assuming that the file format is Timepoint V0 Trise. Von Ton V? Tfall Toff 0.000000000000000000us 0 0.010us 5 32.552083333333335702us 5 0.010us 0 The error is: PWL time, value pairs out of chronological order in source V1 3.25521e-005 is not before 1e-008 it already occurs on the first line. -- Christoph Am 25.04.2025 um 12:09 schrieb Christoph via groups.io <kuku@...>:Am 25.04.2025 um 11:49 schrieb Mathias Born via groups.io <mathias.born@...>:It's difficult to find the location in the generated data. Easier it would be to avoid the situation at the side where the data is generated. |
Re: Sine modulated PWM voltage source (PWL file=xxx)
¿ªÔÆÌåÓýAndy,could it be that I'm assuming a different file format as I posted in the other email: Timepoint ??????????????????????????V0 Trise. ??Von Ton ?????????????????????????????????????V? ?Tfall ??????Toff 0.000000000000000000us 0 ?0.010us 5 ???32.552083333333335702us 5 ??0.010us 0 Some (undocumented) data formatting? My idea was, that the first parameter is the proceeding point on the time axis, followed by the start voltage, the rise time, the on voltage, the on-time, followed by another voltage (at the end of the pulse), then the fall time and the off voltage. I built that python program about a year or two ago and I think that file format could be sprung of a discussion here and someone pointed me to "undocumented" PWL file formats.? I may be totally wrong and that example may have only worked before (with other data) by accidence :) -- Christoph
|
Re: Sine modulated PWM voltage source (PWL file=xxx)
I'm having internet connectivity problems. Resorting to my cell phone but cannot upload anything right now.
toggle quoted message
Show quoted text
I'm assuming that the file format is Timepoint V0 Trise. Von Ton V? Tfall Toff 0.000000000000000000us 0 0.010us 5 32.552083333333335702us 5 0.010us 0 The error is: PWL time, value pairs out of chronological order in source V1 3.25521e-005 is not before 1e-008 it already occurs on the first line. -- Christoph Am 25.04.2025 um 12:09 schrieb Christoph via groups.io <kuku@...>:Am 25.04.2025 um 11:49 schrieb Mathias Born via groups.io <mathias.born@...>:It's difficult to find the location in the generated data. Easier it would be to avoid the situation at the side where the data is generated. |
Re: Sine modulated PWM voltage source (PWL file=xxx)
Mathias, The error message clearly led me to the correct guess of the problem, time sequence out of order or unrealizable (zero or negative time step).?? Christoph, I've never used a text file to generate a PWM signal.? I suppose it'd be handy to generate a random bit, or send in a bit of audio or a modulating waveform.? For a simpler PWM signal, I'd suggest using a PULSE source (V or I), and building the first period of the waveform in the setup, and then entering a value for the Period, which will cause the waveform to repeat indefinitely if all is set up right.? An example statement: PULSE (0 {Clock_Vhi} 0 100n 100n 2.5u 5u) generates a 200kHz clock with 50% duty cycle, Vlo=0, Vhi=(Passed in parameter, defined by statement .param Clock_Vhi = 3.3), 100ns rise & fall times, 2.5microsecond time at Vhi, 5microsecond period. The LT Spice XVII help documentation covers this well.? ? I'm still getting used to the new key bindings and help system in LT Spice 24 (keep learning, or get run over!). -Rick, WA2YMS (an occasional contributor)
On Friday, April 25, 2025 at 07:48:14 AM EDT, Andy I via groups.io <ai.egrps+io@...> wrote:
On Fri, Apr 25, 2025 at 06:07 AM, Christoph wrote:
Forgot the mechanism how uploads work here. Is the group notified automatically when an upload occurs?No, not necessarily.? There is a checkbox when you upload, which sends an auto-generated message, which most everyone ignores, and it self-destructs in a few days.? We ask that you always compose and send a real message here, in your message thread, not the auto-generated one, telling us what you uploaded (and why, if it's not obvious). ?
Andy
|
Re: Sine modulated PWM voltage source (PWL file=xxx)
On Fri, Apr 25, 2025 at 06:07 AM, Christoph wrote:
Forgot the mechanism how uploads work here. Is the group notified automatically when an upload occurs?No, not necessarily.? There is a checkbox when you upload, which sends an auto-generated message, which most everyone ignores, and it self-destructs in a few days.? We ask that you always compose and send a real message here, in your message thread, not the auto-generated one, telling us what you uploaded (and why, if it's not obvious). ?
Andy |
Re: Sine modulated PWM voltage source (PWL file=xxx)
Just to be clear, those two lines of data look like this:
which then expands into this:
?
Andy
? |
Re: Sine modulated PWM voltage source (PWL file=xxx)
Christoph,
?
In the first of the two files you uploaded (kuku_pwm_pulses.txt.zip), you have some data points that are not sequential.? The very first line is this:
which has a point at 0.000 us, then one at 0.010 us, then another at 0.010 us, and one at 0.020 us.? The second and third points are a problem because they are both at the same moment in time, not incrementally increasing.? Fortunately they both have the same voltage or current value (5 V or 5 Amps), but it is fundamentally in error for duplicating a time point.
?
That might be the cause of an error.? Hard to say for sure.
?
But later in the file, I see lines such as these:
and those are surely wrong.? ?The time increments are negative, coming before the previous time points.? Those need to be fixed.? (They are also confusing to read, so there is that too.)
?
Andy
?
? |
Re: Sine modulated PWM voltage source (PWL file=xxx)
¿ªÔÆÌåÓý
-- Christoph
|
Re: Sine modulated PWM voltage source (PWL file=xxx)
¿ªÔÆÌåÓýForgot the mechanism how uploads work here. Is the group notified automatically when an upload occurs?Recall there's been something like this. Anyway, here's the link to my recent upload: It's nothing peculiar, just added a voltage source that reads the pulse file. I'm aware that I did a mistake when generating the pulses and I probably can take measures to avoid the conflict, but most important to me is at the moment to know the format tha pulses are sent. My generator (python notebook) does the following: ``` F=60. step=1./(256.*F) # ?s with open("/Users/kuku/Documents/LTspiceXVII/pwm_pulses.txt", "w") as f: ? ? for i in range(3*256): ? ? ? ? t=1E6*float(i)*step # us ? ? ? ? t1=1E6*float(i+1)*step #us ? ? ? ? u=1e6*step*a[i%256] ? ? ? ? if((t+u + trise + tfall)>t1): ? ? ? ? ? ? u=u-tfall-trise ? ? ? ? print(f'{t:0.3f}us 0 +{trise:0.3f}us 5 +{u:0.3f}us 5 +{tfall:0.3f}us 0 ',file=f) ``` -- Christoph
|
Re: Non-converging oscillation problem of inverse Jiles-Atherton model in LTspice
¿ªÔÆÌåÓýOn 25/04/2025 11:10, mhx via groups.io
wrote:
You can use anything you like for net names containing any printable Latin character, except these: (? )? {? } ? '? *? = ,? :? ;? and space. My curiosity showed that even many non-Latin characters and "graphics" like ? and ? are accepted, although these are often not printed properly in the waveform window, which is more limited. You never knew your schematics could be so interesting!"pi", "e", "k", ... are short identifiers. The user may want to use these names for node names/labels or in expressions (K for gain or coupling factor, Pi for input power, e for error...). This can be hard to find, especially in deeply nested subcircuits or when forgetting that there is no case-sensitivity, or when brackets are optional. If you try to redefine pi (perhaps being unaware it is already defined), it will succeed. Personally, I think that should generate at least a warning. OTOH, "temp" is also predefined and can be overridden legitimately. --
Regards, Tony |
Re: Sine modulated PWM voltage source (PWL file=xxx)
toggle quoted message
Show quoted text
|
Re: Sine modulated PWM voltage source (PWL file=xxx)
I'm really trying hard to make the error messages clear, but there is always room for improvement.
?
The message "time value pairs for V1 out of chronological order" means that there are at least two pairs (t1,y1) and (t2,y2) where t2<=t1.
?
Best Regards,
Mathias
?
? |
Re: Sine modulated PWM voltage source (PWL file=xxx)
¿ªÔÆÌåÓýWill do that. Nonetheless it would be helpful if I can have a look at the documentation. I'd better had documented what I did a year before :)Just uploaded kuku_pwm_pulses.txt to the tem area: -- Christoph
|
Re: Sine modulated PWM voltage source (PWL file=xxx)
¿ªÔÆÌåÓýI suggest you upload your pwm_pulses.txt, so we can see what you did, and send a new message to say that you uploaded it. On 2025-04-25 10:22, Christoph via
groups.io wrote:
I'm again at simulating a PWM. The pulses are generated from a file with the statement: PWL file=pwm_pulses.txt It's a while back I generated that file or in other words, I generated a new dataset for that file and I'm suddenly gettings somthing like "time value pairs for V1 out of chronological order". To narrow down the cause, I'm in need again for the file format of such a pulse input file. Where again can I find the documentation for that? I found the PWL section in the wiki but I blinded what the file format is concerned. Thank you. -- Christoph --
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 |
Sine modulated PWM voltage source (PWL file=xxx)
I'm again at simulating a PWM. The pulses are generated from a file with the statement:
PWL file=pwm_pulses.txt It's a while back I generated that file or in other words, I generated a new dataset for that file and I'm suddenly gettings somthing like "time value pairs for V1 out of chronological order". To narrow down the cause, I'm in need again for the file format of such a pulse input file. Where again can I find the documentation for that? I found the PWL section in the wiki but I blinded what the file format is concerned. Thank you. -- Christoph |
Re: Non-converging oscillation problem of inverse Jiles-Atherton model in LTspice
"pi", "e", "k", ... are short identifiers. The user may want to use these names for node
names/labels or in expressions (K for gain or coupling factor, Pi for input power, e for error...). This can be hard to find, especially in deeply nested subcircuits or when forgetting that there is no case-sensitivity, or when brackets are optional. -marcel |
Re: Non-converging oscillation problem of inverse Jiles-Atherton model in LTspice
On Wed, Apr 23, 2025 at 12:55 AM, §¡§Ý§Ö§Ü§ã§Ñ§ß§Õ§â §¢§à§â§Õ§à§Õ§í§ß§à§Ó wrote:
Thanks!
It looks like the trtol setting played a crucial role¡ªit successfully reduced the oscillations. The reason behind the oscillation of sgn(dHdt) was likely that the tolerance for the derivative was set too tight, causing LTspice to over-focus on the exact value of dHdt. This led to repeated attempts, and during these attempts, the sign kept switching frequently. |
Re: MJ11021 Darlington NPN & PNP pair model help needed.
On Wed, Apr 23, 2025 at 04:14 AM, Tony Casey wrote:
The good news is that although Onsemi don't provide SPICE models for either of these devices, it does for the similar MJH11021 and MJH11022 transistors. These will be the same die, but in TO-247 packages instead of TO-3. ... If they are the same die, then their SPICE models would be the same.? SPICE transistor models usually do not include the package (unless they are for upper RF frequencies).
?
Andy |
to navigate to use esc to dismiss