How to reduce speed of matlab function block???

3 views (last 30 days)
Brandon
Brandon on 22 Feb 2014
Answered: Sabin on 11 Feb 2023
I'm doing a project on a PV system involving MPPT using simulink. I have embedded the codes of my MPPT algorithm into a Matlab function block. This block is taking voltage and current values from my PV panel and changing the duty ratio of a dc-dc buck converter accordingly. The problem is that the block is changing the duty ratio too fast. The duty ratio always goes up to 1 in microsec whereas the circuit takes much more time to response. Thus it can't track the MPP.
If there a way i can reduce the speed at which this block is functioning??? I've tried putting a "pause" function in my codes but simulink says "Function 'pause' is not supported for code generation". I need a way to make this block functions slower. Plz help. Thx.

Answers (1)

Sabin
Sabin on 11 Feb 2023
Change the sample time to a more suitable one. I assume the simulation is running in variable-step and that's the source of the problem.

Categories

Find more on Solar Power in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!