# Set parameter from voltage output (LTspice)

I have PULSE(0 123 0 0.0000001 0.0000001 0.0000333 0.0000666) and I want to change the sixth parameter according to a voltage source output. I need to alter the parameter to make sine wave.

How could I do that?

I would imagine something like PULSE(0 123 0 0.0000001 0.0000001 V1+0.0000333 0.0000666)

TV1 is SINE(0 0.0000333 50 0)

• Just add two voltage sources, one a PULSE the other a SINE. Neither of those accepts time dependent variables as parameters, but they can accept .param. Aug 20 '21 at 14:37
• but can .param be time dependant? i simply need to change pulse value to simulate sine wave with pwm Aug 21 '21 at 13:21

All .param statements are evaluated prior to simulation start, therefore time, which starts at zero with the simulation, cannot be a parameter. A .func can be time dependent, but then its evaluation will only be done during the simulation. Implicitly, if the PULSE and the SINE sources can accept .param but not time-dependent .func definitions then they can't have variable parameters.
However, put like that it's an XY problem. What you describe is a PWM, since you need to vary the 6th term (Ton) in a PULSE, according to a SINE. For that, there already are solutions.