How to Correct Signal Waveform (may use some filter)

2 ビュー (過去 30 日間)
Runzi Hao
Runzi Hao 2023 年 5 月 2 日
コメント済み: Runzi Hao 2023 年 5 月 3 日
Hello, I would like to ask is there a way to process below data so that, when y goes from -1 to 1 (or from 1 to -1), there are no small dips near 1 (or -1). The force applied to generate such data has squre waveform. But my data waveform is distorted.
I have tried using lowpass(), but the dips are still there. Data and figure are attached.
Manny thanks and best regards,
Ryanne
  1 件のコメント
Runzi Hao
Runzi Hao 2023 年 5 月 2 日
編集済み: Runzi Hao 2023 年 5 月 3 日
Also I hope the near 1 (or near -1) signals before the dips can be increased to 1 (or -1).
The sampling rate is 1e11 Hz. Data in first column is in nanoseconds.

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

採用された回答

Chunru
Chunru 2023 年 5 月 3 日
You can try to use a low pass filter.
websave("data.mat", "https://www.mathworks.com/matlabcentral/answers/uploaded_files/1372834/ask_matlab_community.mat")
ans = '/users/mss.system.ENlxcn/data.mat'
load data
% design a low pass filter
d = designfilt("lowpassfir", PassbandFrequency=0.04, StopbandFrequency=0.12, ...
PassbandRipple=1, StopbandAttenuation=60);
x = filtfilt(d, dataAsk(:,2));
plot(dataAsk(:,1), dataAsk(:, 2))
hold on;
plot(dataAsk(:,1), x)
  1 件のコメント
Runzi Hao
Runzi Hao 2023 年 5 月 3 日
Cool! It works well and thank you so much for the solution!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSignal Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by