3
\$\begingroup\$

I am trying to create a pulse voltage source in ltspice. The pulse should look like a half cycle of a sine wave however the rise and fall times should be different. I can create such pulse with the PULSE function of ltspice and can create a half cycle sine wave but I don't know how to create a nonsymmetric sine pulse. The rise time should be 10 microseconds and fall time should be 15 microseconds. I added a picture that I drew for you to visualize.

Thanks in advance.The pulse should look like this picture

\$\endgroup\$
  • \$\begingroup\$ Does LTspice have "switch" component? \$\endgroup\$ – analogsystemsrf Sep 5 at 9:38
  • \$\begingroup\$ Not like a real one that you can open and close but it does have switches that are controlled by voltage or current. \$\endgroup\$ – Ekin Alparslan Sep 5 at 10:16
3
\$\begingroup\$

This is not a very beautiful approach, but it works (for this signal).

First I created two voltage sources, which provide the two halves of the signal.

So V1 is SINE(0 8 25k 0 0 0 0.25), a 25 kHz sine but only for a quarter cycle, so that it stops at the maximum value.

V2 is SINE(0 8 16k6667 10u 0 90 0.25), 16.67 kHz sine but shifted by 90° so it starts at the maximum, again for a quarter cycle, so that it will stop at zero.

The real output is then a BV-source with V=min(V(Vout1),V(Vout2)) so it outputs always the smaller of the two voltages, which works in this case because one starts at the maximum value and the other one stops at the maximum value.

The frequencies are easy to calculate: it's just \$f = \frac{1}{4 \times t}\$ where t is either the rise or the fall time.

final solution

\$\endgroup\$
  • 1
    \$\begingroup\$ Thank you so much for your time. I had tried the same thing with using 2 voltage sources but the one I inverted with 90 degrees always had a DC voltage at the beginning so I tried to subtract that DC with another voltage source and it was not efficient as this one and also have other problems. Turned out I was completely wrong with the frequency calculations. I found the frequency of each voltage source as they are normal sinusoids and then specify the cycle number as 0.25. I still don't understand what is wrong in my approach but yours worked out perfectly. Again thank you. \$\endgroup\$ – Ekin Alparslan Sep 5 at 10:11
  • \$\begingroup\$ @EkinAlparslan hmm, your approach doesn't sound wrong. Without the netlist it's hard to tell. Probably a minor mistake which takes hours to figure out :D Glad I could help. \$\endgroup\$ – Arsenal Sep 5 at 13:17
  • 1
    \$\begingroup\$ @Arsenal You could reduce your approach by only using two sources: voltage sin 0 8 {50/3} 10u 0 90 0.25 rser=1, and current source (pointing down) sin 8 8 25k 0 0 0 0.25 in parallel. You reduce the behavioural source, while having a convergence-friendly solution, and with only one node, which will also behave like a quasi-real source by having an output impedance. If you need repetition, you could make use of the builtin MODULATE(2) with an FM-pin driving source. \$\endgroup\$ – a concerned citizen Sep 5 at 15:40
  • \$\begingroup\$ @aconcernedcitizen that is an interesting approach and I think worthy of an own answer. Like I said, this was just the first thing which came to my mind and those ideas typically aren't very beautiful. \$\endgroup\$ – Arsenal Sep 6 at 9:14
  • \$\begingroup\$ @Arsenal Nothing interesting about it, feel free to modify your answer with it. :-) \$\endgroup\$ – a concerned citizen Sep 6 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.