frdfun
説明
例
周波数応答モデルへの関数の適用
この例では、周波数のグリッドの伝達関数の応答を計算して、周波数応答データ モデルを作成します。この例では、一連の 10 の周波数を仮定します。
H = tf([-1.2,-2.4,-1.5],[1,20,9.1]); w = logspace(-2,3,10); sys = frd(H,w)
sys = Frequency(rad/s) Response ---------------- -------- 0.0100 -0.1648 + 9.847e-04i 0.0359 -0.1644 + 3.508e-03i 0.1292 -0.1597 + 1.130e-02i 0.4642 -0.1294 + 9.857e-03i 1.6681 -0.1058 - 7.515e-02i 5.9948 -0.1883 - 3.050e-01i 21.5443 -0.7004 - 5.495e-01i 77.4264 -1.1337 - 2.623e-01i 278.2559 -1.1946 - 7.725e-02i 1000.0000 -1.1996 - 2.159e-02i Continuous-time frequency response.
sys
は、10 の周波数での周波数応答が含まれる SISO 周波数応答データ (frd
) モデルです。
frdfun
コマンドを使用して関数 imag
を frd
モデル sys
に適用し、周波数応答の虚数部を周波数の関数として取得します。
sysImag = frdfun(@imag,sys)
sysImag = Frequency(rad/s) Response ---------------- -------- 0.0100 9.847e-04 0.0359 3.508e-03 0.1292 1.130e-02 0.4642 9.857e-03 1.6681 -7.515e-02 5.9948 -3.050e-01 21.5443 -5.495e-01 77.4264 -2.623e-01 278.2559 -7.725e-02 1000.0000 -2.159e-02 Continuous-time frequency response.
sys
の周波数応答の振幅を関数 abs
で取得することもできます。
sysMag = frdfun(@abs,sys)
sysMag = Frequency(rad/s) Response ---------------- -------- 0.0100 0.1648 0.0359 0.1644 0.1292 0.1601 0.4642 0.1298 1.6681 0.1298 5.9948 0.3585 21.5443 0.8902 77.4264 1.1637 278.2559 1.1971 1000.0000 1.1998 Continuous-time frequency response.
MIMO 周波数応答モデルの特定の I/O ペアの振幅
この例では、各 I/O ペアについて 100 のテスト周波数を含む 2x2 MIMO 周波数応答モデル sys
について考えます。
MAT ファイル frdModelMIMO.mat
から frd
オブジェクト sys
を読み込みます。
load('frdModelMIMO.mat','sys') size(sys)
FRD model with 2 outputs, 2 inputs, and 100 frequency points.
sys
の 2 番目の I/O ペアの周波数応答の振幅を計算する関数を定義します。
fun = @(h) abs(h(2,2));
frdfun
コマンドを使用して関数 fun
を sys
の特定の I/O ペアに適用します。
fsys = frdfun(fun,sys);
入力引数
fun
— frd
モデルに適用する関数
MATLAB® 関数
frd
モデルに適用する関数。MATLAB 関数として指定します。関数 fun
は、周波数全体で単一の行列を受け入れて、スカラー、ベクトル、または固定サイズの行列を返さなければなりません。
出力引数
バージョン履歴
R2020a で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)