¿ªÔÆÌåÓý

Making a PWM a continuous voltage source


 

Is it possible to make a PWM signal a continuous voltage source ?

I have these PWL points in a file but simulating this I have transient response and decay behaviour. I would like to do a FFT on the filter output signal
and the presence of these spoil the FFT picture. Using a sine as a voltage source it behaves like an infinite signal while the PWL from file is always finite, seems so.

I tried the statement: PWL REPEAT FOREVER ( | one_period.txt) ENDREPEAT from the undocumentedcommands section of the wiki to no avail.
The "|" (pipe symbol) gives an error.

--
Christoph


 

¿ªÔÆÌåÓý

On 29/04/2025 11:58, Christoph via groups.io wrote:
Is it possible to make a PWM signal a continuous voltage source ?

I have these PWL points in a file but  simulating this I have transient response and decay behaviour. I would like to do a FFT on the filter output signal
and the presence of these spoil the FFT picture. Using a sine as a voltage source it behaves like an infinite signal while the PWL from file is always finite, seems so.

I tried the statement: PWL REPEAT FOREVER ( | one_period.txt) ENDREPEAT from the undocumentedcommands  section of the wiki to no avail.
The "|" (pipe symbol) gives an error.
Try removing the pipe. That part of the documentation is confusing. The example showing the pipe doesn't mean you should add it. Using the syntax from the other clearer example:

PWL REPEAT FOREVER ( file=one_period.txt ) ENDREPEAT

See: PWL_Example

--
Regards,
Tony


 

On Tue, Apr 29, 2025 at 05:59 AM, Christoph wrote:
I tried the statement: PWL REPEAT FOREVER ( | one_period.txt) ENDREPEAT from the undocumentedcommands section of the wiki to no avail.
The "|" (pipe symbol) gives an error.
I do not understand why the "|" character is there in the LTwiki page for "Undocumented LTspice".? I am sure that was a typo.? As far as I know, the pipe character is never used anywhere in LTspice netlists.
?
My best guess (in message 147247 which was a reply in 2023 to a question from you) is that the author of that LTwiki page had intended to write it this way:
... PWL REPEAT FOREVER ( <t1> <v1> ... <tn> <vn> | file=<file spec> ) ENDREPEAT
where the "|" character does not mean to literally type the pipe character there.? In that setting, "|" means "OR", as in, "use either this, or this".? And then somewhere along the way, that line was edited down and the meaning was lost.? His examples, just a few lines lower on that page, show the correct syntax.
?
Unfortunately we can't ask AnalogSpiceman for clarification because he passed on from this world in 2020.
?
Andy
?
?


 

try this
/g/LTspice/files/z_yahoo/Examples/Apps/pwm4_Pulse.zip