How to calculate an integral or derivative using capacitors and inductors?
How to calculate an integral or derivative using capacitors and inductors
As you progress with your simulation abilities it will become clear that there isn't a pre-built library element to describe every single model type that you might need. It will become necessary to be able to model math equations of derivatives and integrals with inductors and capacitors.
Lets consider the equation which defines the voltage across and inductor V(t) = L* di/dt so if L = 1 we have:
- V(t) = di/dt or
- integral(V) = i(t)
For a capacitor I(t) = C * dv/dt, if C = 1 we have:
- I(t) = dv/dt
- integral( I ) = V(t)
So if we define the voltage or current through or across an inductor or capacitor it will give us the integral or derivative depending on which value we define.
Here we define the voltage and see that the capacitor gives us the derivative while the inductor gives us the integral
We can see in the top the the max value of the orange waveform (derivative) occurs at the zero cross of the sine wave.
We also see in the bottom one that the orange curve hits the maximum when we have only integrated the postive cycle and goes back to zero after we include the negative cycle.
We can recreate with a current source and it will be opposite.
You can use this to create variable inductors and capacitors or model novel electric machines, etc.
Happy modelling!