Main Content

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

三角波のスルー レート

この例では、三角波の上り勾配と下り勾配の推定としてスルー レートを使用する方法を示します。3 つの三角波を作成します。波形の 1 つは ±2 の上り勾配と下り勾配をもち、別の 1 つの波形は ±12 の上り勾配と下り勾配をもち、そして残りの 1 つの波形は +2 の上り勾配と -12 の下り勾配をもちます。slewrate を使用して、波形の勾配を求めます。

tripuls を使用して、±2 の上り勾配と下り勾配をもつ三角波を作成します。サンプリング間隔を 0.01 秒に設定します。これはサンプル レート 100 Hz に相当します。

dt = 0.01;
t = -2:dt:2;

x = tripuls(t);

三角波のスルー レートを計算してプロットします。サンプル レート 100 Hz を入力して正確な正負の勾配の値を求めます。

slewrate(x,1/dt)

Figure Slew Rate Plot contains an axes object. The axes object with xlabel Time (seconds), ylabel Level (Volts) contains 12 objects of type patch, line. One or more of the lines displays its values using only markers These objects represent slew rate, signal, upper cross, lower cross, upper boundary, upper state, lower boundary, upper reference, lower reference, lower state.

ans = 1×2

    2.0000   -2.0000

勾配が ±12 になるように三角波の幅を変更します。スルー レートを計算してプロットします。

x = tripuls(t,4);
slewrate(x,1/dt)

Figure Slew Rate Plot contains an axes object. The axes object with xlabel Time (seconds), ylabel Level (Volts) contains 12 objects of type patch, line. One or more of the lines displays its values using only markers These objects represent slew rate, signal, upper cross, lower cross, upper boundary, upper state, lower boundary, upper reference, lower reference, lower state.

ans = 1×2

    0.5000   -0.5000

+2 の上り勾配と -12 の下り勾配をもつ三角波を作成します。スルー レートを計算します。

x = tripuls(t,5/2,-3/5);
s = slewrate(x,1/dt)
s = 1×2

    2.0000   -0.5000

s の最初の要素は上り勾配で、2 番目の要素は下り勾配です。結果をプロットします。

slewrate(x,1/dt);

Figure Slew Rate Plot contains an axes object. The axes object with xlabel Time (seconds), ylabel Level (Volts) contains 12 objects of type patch, line. One or more of the lines displays its values using only markers These objects represent slew rate, signal, upper cross, lower cross, upper boundary, upper state, lower boundary, upper reference, lower reference, lower state.

参考

|