How to calculate mean of this signal in the image below.

2 ビュー (過去 30 日間)
Hammad
Hammad 2018 年 8 月 20 日
編集済み: Dimitris Kalogiros 2018 年 8 月 20 日
How to calculate Black waveform from brown waveform.
  6 件のコメント
Dimitris Kalogiros
Dimitris Kalogiros 2018 年 8 月 20 日
Does your paper talk about synchronization or PLLs or something like that?
Hammad
Hammad 2018 年 8 月 20 日
Title of paper: A Simulation Study of Crazy-PSO Controller For Direct Matrix Converter. I thinks its done by moving average.

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

採用された回答

Dimitris Kalogiros
Dimitris Kalogiros 2018 年 8 月 20 日
編集済み: Dimitris Kalogiros 2018 年 8 月 20 日
I tried to generate your input data.
If you set noise_amp=0, you will observe the influence of moving average on your useful data.
% input signal generation
t=0:0.001:40;
signal_amp=1;
noise_amp=2;
clip_amp=4;
x=signal_amp*sin(2*pi*0.25*t);
x=x+noise_amp*randn(size(x));
x(x>clip_amp)=clip_amp;
x(x<-clip_amp)=-clip_amp;
% moving average
y=zeros(size(x));
y(1)=x(1);
gain=0.001;
for n=2:length(x)
y(n)=(y(n-1)+gain*x(n))/(1+gain);
end
% compare signals
figure;
plot(t,x,'-r','color',[1 .4 .2]); hold on;
plot(t,y,'-k');
zoom on; grid on;
xlabel('time')
legend('input data', 'moving average');

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeHilbert and Walsh-Hadamard Transforms についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by