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.

Question regarding a PID controller

Please login with a confirmed email address before reporting spam

Hello,

I have a question regarding the use of a PID controller. The idea is to control de power of a laser beam using as input the value of the temperature at the surface of the material. I have managed to do it by integrating the surface temperature over the interaction area and using a global ODE for the "I" term of the controller. This was done by setting the solver time step equal to the experimental measuring device integration time, and it worked fine. Now I have a slighlty different problem, where the time step must be smaller, so I cant tune it to the pyrometer (temperature measuring device) integration time. I would like to know if there is a way to integrate an expression, via an integration operator, but using a different time step than that of the solver.

Best regards!

2 Replies Last Post May 22, 2012, 3:31 a.m. EDT
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 16, 2012, 12:52 p.m. EDT
Hi

indeed very interesting question, you need to average or integrate over one time stepping scheme, and have the solver working at another smaller time step sequence. But that means that your controller is giving a constant set value for the time of the short steps, and that it is discretized at the larger sampling/time steps, but you need to integrate in between the control value.

Perhaps one way, use fixed time steps with m (integer) small steps per integration step and use the at(n-m) operator (have to check that the at() operator is valid for the solving,and not only the postprocessing), and you need to stabilise your set values in between the integration time.

If you find a way pls report back, that can be useful. I would also suggest to use "support" to get help for such nice cases

--
Good luck
Ivar
Hi indeed very interesting question, you need to average or integrate over one time stepping scheme, and have the solver working at another smaller time step sequence. But that means that your controller is giving a constant set value for the time of the short steps, and that it is discretized at the larger sampling/time steps, but you need to integrate in between the control value. Perhaps one way, use fixed time steps with m (integer) small steps per integration step and use the at(n-m) operator (have to check that the at() operator is valid for the solving,and not only the postprocessing), and you need to stabilise your set values in between the integration time. If you find a way pls report back, that can be useful. I would also suggest to use "support" to get help for such nice cases -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 22, 2012, 3:31 a.m. EDT
Hello again!

Thanks for your advice Ivar. Unfortunately I'm not really familiar with the at(n-m operator). I just checked the doc and it states there that this operator can only be used during results evaluation, not during model set-up.

I just contacted support. I will get back to you guys when/if they manage to provide a valid solution.

Best regards.
Hello again! Thanks for your advice Ivar. Unfortunately I'm not really familiar with the at(n-m operator). I just checked the doc and it states there that this operator can only be used during results evaluation, not during model set-up. I just contacted support. I will get back to you guys when/if they manage to provide a valid solution. Best regards.

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.