Unable to run stateflow in MATLAB using c2000

2 views (last 30 days)
I am using TMS320F28379d controller using matlab simulink. My code has two ADC channels and three PWM outputs. I am working on MPPT for PV system. Two PWM channels are directly connected to the ADC and they are working fine. The third PWM is used to control the duty ratio of the converter to track the MPP.
The code was running good. I did not made any changes. Suddenly the stateflow is no working and the MPP trackong is stopped. The PWM is giving a constant output.

Answers (1)

Sayan
Sayan on 14 Sep 2023
I understand from your issue that the MPP tracking is stopped in your model as the duty ratio of the PWM pulses provided from the third PWM pin is not changing. The few possible issues and their fixes are mentioned below.
  • Check if the MPPT algorithm implemented in stateflow is working as expected. You can use the "Debug" tool for the same.
  • Ensure the "CMPA" value provided to the third ePWM is changing according to the logic developed for MPPT.
  • Ensure that the voltage provided to the ADC pin of the board is within its sensible limit and that the output is scaled (up or down) according to the scaling factor of the voltage sensor you are using.
  • Ensure that the sample time of the ADC block is an integer multiple of the "Fixed-step size" of the model. You can change it from MODELING > Model Settings > Solver > Solver details.
You can refer to the following link to know more about MPPT algorithm
Further details on the ePWM block and ADC block can be found in the following MATLAB documentation:
  1. ePWM block:https://www.mathworks.com/help/ti-c2000/ref/c280xc2802xc2803xc2805xc2806xc2833xc2834xf28m3xf2807xf2837xdf2837xsf2838xf28004xf28002xf28003xepwm.html
  2. ADC block:https://www.mathworks.com/help/ti-c2000/ref/c2802xc2803xc2805xc2806xf28m3xf2807xf2837xdf2837xsf2838xf28004xf28002xf28003xadc.html
Hope this helps in resolving the issue.

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!