Main Content

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

envelope

説明

[yupper,ylower] = envelope(x) は、入力シーケンス x の上下の包絡線を、この入力シーケンスの解析信号の振幅として返します。hilbert で実装されているように、x の解析信号は離散フーリエ変換を使用して検出されます。関数は、最初に x の平均値を取り除き、包絡線を計算した後でそれを加算し直します。x が行列の場合、envelopex の各列に対して個別に動作します。

[yupper,ylower] = envelope(x,fl,'analytic') は、この入力シーケンスの解析信号の振幅を使用して決定された x の包絡線を返します。解析信号は、長さ fl のヒルベルト FIR フィルターで x をフィルター処理することによって計算されます。この構文は、2 つの引数のみを指定した場合に使用されます。

[yupper,ylower] = envelope(x,wl,'rms') は、x の上下の平方根平均二乗 (RMS) 包絡線を返します。包絡線は、長さ wl サンプルのスライディング ウィンドウを使用して決定されます。

[yupper,ylower] = envelope(x,np,'peak') は、x の上下のピーク包絡線を返します。包絡線は、少なくとも np サンプル単位に分割された局地的最大値に対してスプライン内挿を使用して決定されます。

出力引数をもたない envelope(___) は、信号およびその上下の包絡線をプロットします。この構文は、前の構文の任意の入力引数を受け入れます。

すべて折りたたむ

ガウス変調された 2 次チャープを生成します。2 kHz のサンプル レートと 2 秒の信号持続時間を指定します。

t = 0:1/2000:2-1/2000;
q = chirp(t-2,4,1/2,6,'quadratic',100,'convex').*exp(-4*(t-1).^2);
plot(t,q)

Figure contains an axes object. The axes object contains an object of type line.

解析信号を使用して、チャープの上下の包絡線を計算します。

[up,lo] = envelope(q);
hold on
plot(t,up,t,lo,'linewidth',1.5)
legend('q','up','lo')
hold off

Figure contains an axes object. The axes object contains 3 objects of type line. These objects represent q, up, lo.

平均が非ゼロのため、信号は非対称です。

出力引数なしで envelope を使用して、信号および包絡線をサンプル数の関数としてプロットします。

envelope(q)

Figure contains an axes object. The axes object with title Analytic Envelope contains 3 objects of type line. These objects represent signal, envelope.

1 kHz で 3 秒間サンプリングされた次の 2 チャネルの信号を作成します。

  • 一方のチャネルは指数的に減衰する正弦波です。7 Hz の周波数と 2 秒の時定数を指定します。

  • もう一方のチャネルは、ガウス変調し、時間をずらした 2 の DC 値をもつチャープです。初期のチャープ周波数を 30 Hz とし、2 秒後に 5 Hz に減衰するように指定します。

信号をプロットします。

t = 0:1/1000:3;
q1 = sin(2*pi*7*t).*exp(-t/2);
q2 = chirp(t,30,2,5).*exp(-(2*t-3).^2)+2;
q = [q1;q2]';

plot(t,q)

Figure contains an axes object. The axes object contains 2 objects of type line.

信号の上下の包絡線を計算します。長さが 100 のヒルベルト フィルターを使用します。チャネルと包絡線をプロットします。上側包絡線には実線を使用し、下側包絡線には破線を使用します。

[up,lo] = envelope(q,100,'analytic');
hold on
plot(t,up,'-',t,lo,'--')
hold off

Figure contains an axes object. The axes object contains 6 objects of type line.

出力引数なしで envelope を呼び出し、信号と信号の包絡線のプロットをサンプル数の関数として生成します。フィルター長を 300 に増やすと、より滑らかな形状が得られます。入力引数を 2 つ指定した場合、'analytic' フラグが既定の設定になります。

envelope(q,300)

Figure contains an axes object. The axes object with title Analytic Envelope contains 6 objects of type line.

列車の警笛の録音の移動 RMS 包絡線を計算してプロットします。150 サンプルの長さのウィンドウを使用します。

load('train')

envelope(y,150,'rms')

Figure contains an axes object. The axes object with title RMS Envelope contains 3 objects of type line. These objects represent signal, envelope.

30 サンプルの区間にわたって平滑化した音声信号の上下のピーク包絡線をプロットします。

load('mtlb')

envelope(mtlb,30,'peak')

Figure contains an axes object. The axes object with title Peak Envelope contains 3 objects of type line. These objects represent signal, envelope.

分散性媒質を通して伝播する光パルスの初期検出に似た信号を作成してプロットします。

t = 0.5:-1/100:-2.49;
z = airy(t*10).*exp(-t.^2);

plot(z)

Figure contains an axes object. The axes object contains an object of type line.

その解析信号の振幅を使用して、シーケンスの包絡線を決定します。包絡線をプロットします。

envelope(z)

Figure contains an axes object. The axes object with title Analytic Envelope contains 3 objects of type line. These objects represent signal, envelope.

50 タップのヒルベルト フィルターを使用して、信号の解析包絡線を計算します。

envelope(z,50,'analytic')

Figure contains an axes object. The axes object with title Analytic Envelope contains 3 objects of type line. These objects represent signal, envelope.

40 サンプルの移動ウィンドウを使用して、信号の RMS 包絡線を計算します。結果をプロットします。

envelope(z,40,'rms')

Figure contains an axes object. The axes object with title RMS Envelope contains 3 objects of type line. These objects represent signal, envelope.

ピーク包絡線を決定します。少なくとも 10 サンプルで分割された局地的最大値に対して、節点なしの条件のスプライン内挿を使用します。

envelope(z,10,'peak')

Figure contains an axes object. The axes object with title Peak Envelope contains 3 objects of type line. These objects represent signal, envelope.

入力引数

すべて折りたたむ

入力シーケンス。ベクトルまたは行列で指定します。x がベクトルの場合、単一チャネルとして取り扱われます。x が行列の場合、envelope は各列に対して個別に包絡線推定を計算します。x のすべての要素は有限でなければなりません。

例: cos(pi/4*(0:159))+randn(1,160) は単一チャネルの行ベクトル信号です。

例: cos(pi./[4;2]*(0:159))'+randn(160,2) は 2 チャネル信号です。

データ型: single | double

ヒルベルト フィルターの長さ。正の整数スカラーで指定します。このフィルターは、理想的なブリックウォール フィルターに、長さ fl、形状パラメーター β = 8 のカイザー ウィンドウを適用することによって作成されます。

データ型: single | double

ウィンドウの長さ。正の整数スカラーで指定します。

データ型: single | double

ピーク離隔距離。正の整数スカラーで指定します。

データ型: single | double

出力引数

すべて折りたたむ

上下の信号包絡線。ベクトルまたは行列として返される。

拡張機能

バージョン履歴

R2015b で導入