Error in 'Circuit': Initialization commands cannot be evaluated?

after adding a capacitor to the transformer as I wanted to model it completely with the capacitive effect of the real transformer, I got this error which I don’t understand

State/source dependence in components- circuitPlecs1/Circuit/C1

circuitPlecs1.slx (24.9 KB)

Hi EMdude,

Connecting a capacitor to a voltage source is invalid because you can’t change it’s voltage instantly. You could add some internal resistance to the source to fix the error. Keep in mind that the circuit still doesn’t make much sense. To model a transformer with parasitic elements you should consider expanding your model to a more elaborate state. The “Mutual Inductance” block in PLECS might give you a place to start.

Best Regards

Falk