MATLAB Answers

C2000 series FFT analysis problem

1 ビュー (過去 30 日間)
Lingzhe Sun
Lingzhe Sun 2020 年 11 月 3 日
コメント済み: Lingzhe Sun 2020 年 11 月 10 日
Hi all,
I'm using matlab2020a & Simulink and TI F28379D Lauchpad to auto generate code for my FFT analysis project. The problem is related to the FFT block under DSP System Toolbox. I'm currently doing a few tests and get into some problems. I used the ePWM triggered ADC and linked the output to matrix sum and then into the FFT block. A message says that I need to specify the sample time. And here's my questions:
  1. The original idea is to trigger the FFT every time the signal is sampled, why do I still need to specify the sample time? Should it be exactly 1 divided by the frequency of epwm? What is the mechanism behind this?
  2. If I use the interrupt trigger to generate a function call and put thoes functions in the function call subsystem, the same message pops up. Is there any example showing how this might work?
Your reply is appreciated!

  0 件のコメント

サインインしてコメントする。

回答 (1 件)

Venkatesh Chilapur
Venkatesh Chilapur 2020 年 11 月 3 日
Hi,
Please check out this example and let me know if you have more questions.
Regarding sample time you still need to specify step time(base rate) of the model. You can assign that in the Fixed-step size (fundamental sample time) under solver setiings in the model configurations.
You should be able to set your Fixed-step size (fundamental sample time) to "auto" and the solver will determine the correct sample time for the model to run at based on the sample time settings you've chosen from the blocks in the model.
If you want to force the model to execute at a specific sample time, you can assign that in the Fixed-step size (fundamental sample time), you can do that too.
Regards,
Venkatesh C

  1 件のコメント

Lingzhe Sun
Lingzhe Sun 2020 年 11 月 10 日
Hi, Venkatesh
Sorry that I didn't notice a email has been sent to my mailbox. Thank you for the reply. I'll try later this week to see if it helps.
Best Regards!

サインインしてコメントする。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by