sampling time issue with c2000 F28379d and matlab simulation.
18 次查看(过去 30 天)
显示 更早的评论
hello,
I am implementing a simulation for hardware in matlab. The simulink file is running at sampling time at 1e-4. At this sasmpling frequency, I am losing some samples, and ADC not taking total samples of voltage signal values above 2khz. Then i try to dump the simulink file at a sampling time 1e-6, it showing some error, and it not reaching the data to target also. the error like it showing is" code replacement library must provide entries for semaphore/mutex creation."I am running an induction motor at 1e-4 sampling time with an open loop. Now I am sensing the voltage signal at a switching frequency of 10 kHz through ADC in hardware. As per my design of the voltage sensing circuit will give a peak to peak 3.3v or less. But, input to the ADC and output of ADC is not matching. Then I thought of running my simulation at sampling time 1e-6 because of my sampling time at least ten times the switching frequency. Then I check the ADC through a function generator at sampling time 1e-4 of pulse generation wave with a duty of 50%. The rate of the pulse wave is initially 1khz later I varied the frequency, but the output of my ADC has not matched. Please tell me where I made a mistake in the simulation, what I do to run the simulation entirely at both sampling time 1e-4 and 1e-6.
The below-attached results are an image of my simulation at 1e-4.
4 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 C2000 Microcontroller Blockset 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!