How can I ignore (delete) unwanted peaks of a continious signal?

4 ビュー (過去 30 日間)
Emefun
Emefun 2024 年 3 月 13 日
コメント済み: Emefun 2024 年 3 月 20 日
Hey, i have a signal with peaks (frequency of them is not constant) and goal is to just go over it in a straigt line. The system is build in simulink and i tryed different filter, but didnt' succed. Any ideas?
It is the curve of the speed of a motor and i would like to get a straigt line (red) instead of an overshoot.
Thanks for your help.
Best regards.
  6 件のコメント
Emefun
Emefun 2024 年 3 月 16 日
i dont have access to it until tuesday to send a screenshot, but I can try to explain.
I get the velocitycurve of the motor with disturbances from a subsystem. I should transfer this curve without the disturbance-peaks into my system.
It is just important, that the system don't get the peaks. It would be instable then.
Emefun
Emefun 2024 年 3 月 20 日

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

採用された回答

John D'Errico
John D'Errico 2024 年 3 月 13 日
Just choose some point where the curve should have settled into its long term nominal state. That should be at or about a time of 25 in your plot.
Next, take the median value of the curve over that interval, here from a time of 25 to the end.
help median
MEDIAN Median value. For vectors, MEDIAN(x) is the median value of the elements in x. For matrices, MEDIAN(X) is a row vector containing the median value of each column. For N-D arrays, MEDIAN(X) is the median value of the elements along the first non-singleton dimension of X. MEDIAN(X,"all") is the median of all elements of X. MEDIAN(X,DIM) takes the median along the dimension DIM of X. MEDIAN(X,VECDIM) operates on the dimensions specified in the vector VECDIM. For example, MEDIAN(X,[1 2]) operates on the elements contained in the first and second dimensions of X. MEDIAN(...,NANFLAG) specifies how NaN values are treated: "includemissing" / "includenan" - (default) The median of a vector containing NaN values is also NaN. "omitmissing" / "omitnan" - The median of a vector containing NaN values is the median of all its non-NaN elements. If all elements are NaN, the result is NaN. Example: X = [1 2 4 4; 3 4 6 6; 5 6 8 8; 5 6 8 8] median(X,1) median(X,2) Class support for input X: float: double, single integer: uint8, int8, uint16, int16, uint32, int32, uint64, int64 See also MEAN, STD, MIN, MAX, VAR, COV, MODE. Documentation for median doc median Other uses of median categorical/median prob.NormalDistribution/median codistributed/median tabular/median datetime/median tall/median duration/median timeseries/median fixedpoint/median
Finally, discard any value ABOVE that median. You can just use min to perform that task. You might even be more aggressive, and choose the 25th percentile of the curve, as perhaps a better estimate of the long term behavior, better insuring you don't get any of those outlier segments at all.
  2 件のコメント
Emefun
Emefun 2024 年 3 月 16 日
編集済み: Emefun 2024 年 3 月 16 日
hey, thanks for the help.
problem is, that the peak could occur any time. Also the amplitude can get a different value due to requirements of the speed.
Maybe I dont get you right.
Emefun
Emefun 2024 年 3 月 20 日
@John D'Errico it got how to use the min block, but it is a continious signal and i dont know how to build this median in simulink then

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by