Targeting specific samples and extracting the data from the that signal

9 ビュー (過去 30 日間)
Taimoor Khan Mehmand
Taimoor Khan Mehmand 2022 年 11 月 29 日
回答済み: Pravarthana P 2022 年 12 月 9 日
I have a frequency signal which is the output of a subsystem in Simulink (I have attached an image how the signal looks like and also the subsystem from which this signal appears an output). I want to extract data from this signal i.e System_Freq signal whenever this signal starts decreasing until it reaches a point let say 49.7 Hz or in other words I want to target the samples surrounding the frequency excursion which is also shown by the dotted blue window in the image (Frequency_signal) attached. Any suggestions?

回答 (2 件)

Pravarthana P
Pravarthana P 2022 年 12 月 2 日
I understand you are trying to extract the data from Simulink signal, the following workaround may help you to perform the desired function:
  • Configuring the signal to be exported to workspace by right clicking on the signal and selecting “log selected signals”. More customization on how the signal has to be logged can be done in "Data Import/Export" section of Configuration parameters. For more information refer to the following documentation:
  • By using "To Workspace" block the signal can be logged into Workspace and subsequently to a MAT file. To learn more about this block refer to the following documentation:
Once, the signal is logged the required frequency operation can be done by using a programmatic approach. The following MATLAB answer could be referred for extracting the requried frequency:
  1 件のコメント
Taimoor Khan Mehmand
Taimoor Khan Mehmand 2022 年 12 月 2 日
編集済み: Taimoor Khan Mehmand 2022 年 12 月 2 日
Hi Pravarthana,
Thank you for your comment.
However, I don't want to perform the signal logging and sending the desired signals to MATLAB workspace. I wanted to find the value of my system's frequency signal "rate of change of frequency i.e ROCOF" only and that by using " Simulink Matlab function block".
The reason behind using the "Matlab function block" is that I will have to use the " Rate of Change of Signal" to feed to another blocks of simulink model.

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


Pravarthana P
Pravarthana P 2022 年 12 月 9 日
I understand that you are trying to find the “Rate of Change of Signal” using a Simulink block, the following workaround may help you:
The Derivative block approximates the derivative of the input signal u with respect to the simulation time t Thereby, by passing the signal of interest through the Derivation block the rate of change of the signal might be obtained. For more information on the Derivative block, the following documentation link may be helpful:
Hope this information helps you!

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by