I want to model the flyback voltage of a real solenoid in LTspice. The solenoid is powered by rectified, unfiltered 230Vrms. The power is controlled by switching the AC to the rectifier. I measured a DC resistance of 2.5kohm, and ‘scoped a flyback voltage of ~400V when AC is turned off. I have modeled the magnetic circuit of the solenoid in QuickField and have come up with a value of 3.4mH for the winding. I want to model the fly back voltage that the solenoid will produce when the AC is switched off. I modeled this using a 3.4mH inductor with 2.5kohm series resistance as the solenoid and using a voltage controlled switch to turn it on and off. Below is a spice screenshot of the switch on the AC side of the rectifier which is the way the real solenoid is controlled. When this is the case, there is no fly back voltage at all. This doesn’t line up with the measured flyback voltage.
Below are screenshots of the model with the switch on the DC side of the rectifier. They're the same except with different y-axis scales. This time it does generate a flyback voltage, but it is ~100MV which is far from reasonable. Less importantly, it’s negative and I measured a positive flyback voltage with the real solenoid.
Does anyone know what is wrong with my model? Why is there no flyback when the switch is on the AC side? Why is the flyback so big when the switch is on the DC side?
Below are screenshots of the model with the switch on the DC side of the rectifier. They're the same except with different y-axis scales. This time it does generate a flyback voltage, but it is ~100MV which is far from reasonable. Less importantly, it’s negative and I measured a positive flyback voltage with the real solenoid.
Does anyone know what is wrong with my model? Why is there no flyback when the switch is on the AC side? Why is the flyback so big when the switch is on the DC side?