MATLAB Answers


How does Simulink sample time relate to Interrupt Service Routine sample time ?

Asked by Paul Nanfah on 3 Sep 2019
Latest activity Edited by Paul Nanfah on 3 Sep 2019
Hello guys,
I have a questions concerning the simulink model I am building. I am trying to find out with values of P and I are needed for a closed loop controler. That is for a PFC controled by a dspic.
I know that the sample time in Simulink determine the rate at which a given block updates his value. Now, back to the microcontroller. I am implementing the control loop inside an ISR which is triggered every 160 uS, making the calculation and giving the results(dutycyle) to the PWM-Module register.
Am I right to think that by setting the Simulation sample time at 160uS, I should get a similar behavior as the Microcontroller?
I would also like to know how the Sample time on Simulink affects the behavior and/or the stability of a closed loop controller. can anyone link me to a paper exploring the sujet. I can´t find anything on the topic.
sorry for the english, thank you guys


Sign in to comment.

0 Answers