PhysicsTest said:
My idea is i want to generate a sine output current across inductor by varying the PWM duty. I want to simulate the same in LTspice. I am trying it.
Errors are always made with the wrong assumptions. So check mine. I assume this is a unipolar 0 to 5V square voltage signal. This makes a big difference from bipolar signals because of the DC component.
1. Inductor current integrates a step voltage, the resulting
PWM current is not a sine but a triangle wave.
2. The link to the pulsed capacitor file reports ripple (V1-Vo)/2. However, by convention, they only rate capacitors for RMS current and we usually mean p-p when we say ripple going from 0 to 100% and not V(p-p)/2. The maximum ripple current will be when the duty factor is 50% while the maximum DC current is at 100%.
3. The exponential time constant of Tau = L/R = 1.13 ms to reach ~63% of target while the PWM half cycle is 50us/2 = 25 us. After this time you can measure steady state ripple.
4. The triangular current has a DC component current which you integrate over the PWM cycle.
5. Reducing the duty factor causes the average inductor voltage to approach 0 Vdc in 10 τ=10L/R time but this raises the instantaneous positive voltage and slew rate while reducing the negative slew rate by the same amount while always maintaining 5V p-p.
6. Thus, the ripple current [p-p] is a minimum at <1% and >99% and maximum at 50% while the DC current is proportional to the duty factor.
7. To choose an appropriate capacitor for such a problem is a different question not asked but worth learning. We usually de-rate the cap to achieve a certain life and not operate it at the limit which might only last 1kh or 1000 hours. The absolute maximum ripple current is reduced for thermal margin to extend hours of MTBF say from a standard rating of 85'C or an industrial rating 105'C rating and some as high as 125'C and then we convert current to RMS.
p.s.
Arrhenius Law dictates that for every approx 10 'C rise of internal temperature lifetime reduces 50%. Such that the rated RMS current squared * ESR of internal Effective Series Resistance with an elevated ambient causes the standard electrolytic capacitor to last only 1000 to 1500 hrs at 85'C at some Irms current value, which is only 60 'C above the "standard room temp" of 25'C. But don't worry about this until you have to do some real design.