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.

댓글을 달려면 로그인하십시오.

채택된 답변

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 CenterFile Exchange에서 Sources에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by