Simulink integrate for a set duration of time

29 views Asked by At

Could I ask how one might integrate a signal for a set duration of time in Simulink?

I am running a simulation for 60s. Prior to this I manually monitoring the current flow through the capacitor until it is "charged", which was about 5s. After which I only want to integrate that signal for 0 - 5secs only. This could be done by setting manually a time duration to integrate or by monitoring in the model when current flow peak has plateaued. Former should be easier for my purposes.

Thus far I have tried the Continuous-time integration of the input signal but it does not have a time duration parameter.

Simulink integrate

I wonder if a switch or step block or custom function block may work.

1

There are 1 answers

0
3nhu1 On

Thanks to @Patrick for the solution. This is what the answer looks like with a cleaner boolean operator

Diagram Diagram Output Output