How to take FFT and represent it in dB in simulink?

44 ビュー (過去 30 日間)
moh mor
moh mor 2023 年 6 月 20 日
編集済み: moh mor 2023 年 6 月 22 日
Hello, I have designed a simple analog-to-digital converter in simulink. I wish to take FFT from output and show its result in dB in SIMULINK. here is my schematic:
here is settings related to my power spectral density component:
the output is illustrated in the following image:
in above picture, I want power in dB and also, the other problem is that I do not know how to choose a point in the plot.

採用された回答

N A POORNA CHANDRA
N A POORNA CHANDRA 2023 年 6 月 22 日
hi moh mor , here is how can you get the plot in dB
  1. Ensure that you have the Signal Processing Toolbox installed in MATLAB/Simulink, as it provides the necessary blocks for performing the FFT.
  2. In your Simulink model, locate the output signal from your analog-to-digital converter. If it's not already available as a Simulink block, you can use the "From Workspace" block to import the signal.
  3. Connect the output signal to the input of the "FFT" block from the Signal Processing Toolbox. This block computes the discrete Fourier transform (DFT) of the input signal.
  4. Connect the output of the "FFT" block to a "Complex to Magnitude-Angle" block. This block extracts the magnitude of the complex FFT output.
  5. Connect the magnitude output to a "dB" conversion block, also available in the Signal Processing Toolbox. This block converts the magnitude values to decibels.
  6. Finally, connect the output of the "dB" conversion block to a suitable display block, such as a "Scope" or a "To Workspace" block, to visualize or record the result.
  1 件のコメント
moh mor
moh mor 2023 年 6 月 22 日
編集済み: moh mor 2023 年 6 月 22 日
Sorry, why do you just point to "from workspace" and "to workspace" block. I have implemented all parts in simulink. Is there any problem?

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTransforms についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by