Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Limiting current of a coil

Please login with a confirmed email address before reporting spam

Hi,

I'm trying to simulate a coil driven by a PWM voltage source. The voltage source gives 48 V when the output current is under 16 A and cuts the voltage off when it exceeds 16 A. Then when the current drops under 14 A, the voltage source switches on and starts to again supply 48 V.

How could this functionality be realised with Comsol? I tried to use a simple if-function in variable definition but the simulation gets stuck when the current exceeds 16 A.

4 Replies Last Post 2016年2月23日 GMT-5 02:07

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年12月16日 GMT-5 07:27
Okay, managed to get it working. I was using a derivative function in determining if the current was rising or dropping and I used a variable "TIME" as was suggested in the documentation. When I changed it to "t" the model started to work as wanted.

Here is the function I was using in determining the voltage for the coil:

48*flc2hs(t,0)*(mf.ICoil_1<14[A]||(mf.ICoil_1<16[A]&&d(mf.ICoil_1,t)>0))[V]
Okay, managed to get it working. I was using a derivative function in determining if the current was rising or dropping and I used a variable "TIME" as was suggested in the documentation. When I changed it to "t" the model started to work as wanted. Here is the function I was using in determining the voltage for the coil: 48*flc2hs(t,0)*(mf.ICoil_1

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2016年2月22日 GMT-5 04:01
Hi,
Interesting solution, I am currently trying to do a similar thing that I have not been able to solve yet. I am trying to create my own diode from a resistor. Basically, I want the resistor to switch between two values depending on the voltage drop over it, with a smoothing function added to help with convergence. I have had no luck using the built in diode.

I have a little trouble figuring out exactly how you have implemented your expression, have you just set the expression as the voltage of your coil?

Also, I am not familiar with the flc2hs() function. I have searched the documentation and on the web but I am still not sure of how it works. In your expression is not the flc2hs(t,0) always equal to 1 when t>0, e.g. there is no smoothening function? Or am I misunderstanding the function?

Regards,
Stefan Sjökvist
Hi, Interesting solution, I am currently trying to do a similar thing that I have not been able to solve yet. I am trying to create my own diode from a resistor. Basically, I want the resistor to switch between two values depending on the voltage drop over it, with a smoothing function added to help with convergence. I have had no luck using the built in diode. I have a little trouble figuring out exactly how you have implemented your expression, have you just set the expression as the voltage of your coil? Also, I am not familiar with the flc2hs() function. I have searched the documentation and on the web but I am still not sure of how it works. In your expression is not the flc2hs(t,0) always equal to 1 when t>0, e.g. there is no smoothening function? Or am I misunderstanding the function? Regards, Stefan Sjökvist

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2016年2月22日 GMT-5 04:57
Hi,

I inserted that expression as a variable in the component and then used that variable as the voltage of the coil.

Now that you mention it, it seems that the heaviside function is useless in my expression. Now length of the smoothing part of the heaviside function is 0, so it is in practice a straightforward step function.

I think I played around with the scaling of the heaviside function, noticed that the expression worked best with no smoothing and just forgot the flc2hs in the expression.

- Olli
Hi, I inserted that expression as a variable in the component and then used that variable as the voltage of the coil. Now that you mention it, it seems that the heaviside function is useless in my expression. Now length of the smoothing part of the heaviside function is 0, so it is in practice a straightforward step function. I think I played around with the scaling of the heaviside function, noticed that the expression worked best with no smoothing and just forgot the flc2hs in the expression. - Olli

Please login with a confirmed email address before reporting spam

Posted: 8 years ago 2016年2月23日 GMT-5 02:07
Hi,

Thank you for your reply, I have at least managed to create the function I needed. I modified the one in this thread www.comsol.com/community/forums/general/thread/88872/
However, I have not managed to get my solution to converge yet.

If anyone has any tips on how to get a rmm + cir model (with diodes) to converge I would be more than grateful!

/Stefan
Hi, Thank you for your reply, I have at least managed to create the function I needed. I modified the one in this thread http://www.comsol.com/community/forums/general/thread/88872/ However, I have not managed to get my solution to converge yet. If anyone has any tips on how to get a rmm + cir model (with diodes) to converge I would be more than grateful! /Stefan

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.