This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28069: How to implement advance step in an algorithm

Part Number: TMS320F28069


I am a beginner and want to explore the different controller algorithm on TMS320F28069 control card.

In my algorithm the controller take four values as Vs, Iref, I_in and Vdc. then the I_in is used for calculating the next cycle value. so I write it as;

I_in_next = I_in+(Vx_in - Vs)*alpha

where vx_in is the initial value of vx and then this value used to calculate the next value of the vx as:

vx = vx_in +(Iref-I_in_next)*alpha

I tried to implement this code along with the environment of TMS320F28069. however the value of the I_in is not as expected. I t should be a sinusoidal wave form but it is appeared as triangular waveform . Does anyone help me in this regard. I will be overwhelmed for this. If you don't understand the logic, please let me know.

  • Where is I_in coming from? Is it coming from some ADC pin on the MCU? Are you feeding a sine wave into this ADC pin and getting a triangular waveform instead?

  • I_in is a feedback discrete sinusodial wave coming after Adc. Yes i feed a sinusodial signal to Adc pin having an amplitude of 10 and frequency 3kHz which is a represented as Iref. The difference of vx_in and Vs is multipled and then added to I_in to produce the next step of I_in as I_in_next. But when I implement the next step as mentioned before the result should be a sine wave with ripple but it appears as sawtooth wave. Can I expressed in some other way to achieve the expected result or my logic is correct

  • Apologies, but I am unable to understand your issue. Maybe if you provided a diagram of your algorithm, with inputs and outputs clearly labeled?