Programing C2000 F28069M using Matlab simulink

8 ビュー (過去 30 日間)
Damsith Wasala
Damsith Wasala 2020 年 1 月 10 日
回答済み: Antonin 2020 年 1 月 14 日
I am using malab2019b simulink version to program the c2000 f28069m development kit
I do my project on 3 phase inverter and I need to synchronize the inverter with the grid and control the output voltage of the inverter. I did my simulation and it run correctly in Matlab. the switching frequency that I need is 20kH for controlling . But when I upload this to the board it can only work for 2.5kH only. If the switching frequency increased than 2.5kH it gives a error. (I change the sampling time according to the switching frequency.).
Other problem is I am using a ADC block to give the input(Voltage measurement) input signal is distorted more. I attach some pictures of my output and simulation.
in hear sample time is 0.0001s
Screenshot (89).png
This is my Input sine wave shows in Matlab Scope
Screenshot (90).png
I incresed sample time to 0.00001 and then this error occur
Screenshot (91).png
plz give me a solution for this two problems
Thank you.

回答 (2 件)

Venkatesh Chilapur
Venkatesh Chilapur 2020 年 1 月 13 日
We have motor control example using ePWM block which is more efficient way to produce the 3phase output than GPIO DO. Here is the link to the page:
You may also find the video handy when exploring these models.
Venkatesh C

Antonin 2020 年 1 月 14 日
Hi Damsith Wasala,
This is a logging issue. Your ADC is fine, External mode is not able to log at these rates.
Please take a look at the answer I provided on this page:
If you want to log at 20kHz, I suggest that you use the technic descirbed as 2-model approach.
I hope it helps,




Community Treasure Hunt

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

Start Hunting!

Translated by