Implementing factored form in MATLAB?

4 ビュー (過去 30 日間)
ABTJ
ABTJ 2021 年 3 月 10 日
コメント済み: Walter Roberson 2021 年 3 月 10 日
I have a z transform in rational form as shown in attached photo
and i want to convert it into factored form
How can i implement it in MATLAB? I learnt from a google resource that we should use "zp2sos"command but i am not satisfied because output of "zp2sos"command does not looks like factored form
  1 件のコメント
Walter Roberson
Walter Roberson 2021 年 3 月 10 日
By the way, you do not need to create an zpk intermediate form
z = tf('z');
H = (4*z^2+3*z+9)/(4*z^2+3*z-4)
H = 4 z^2 + 3 z + 9 --------------- 4 z^2 + 3 z - 4 Sample time: unspecified Discrete-time transfer function.
H = [H, z/H] %just to give a more complicated system
H = From input 1 to output: 4 z^2 + 3 z + 9 --------------- 4 z^2 + 3 z - 4 From input 2 to output: 4 z^3 + 3 z^2 - 4 z ------------------- 4 z^2 + 3 z + 9 Sample time: unspecified Discrete-time transfer function.
HN = H.Numerator;
HD = H.Denominator;
HN = cellfun(@(C) C(find(C,1):end), HN, 'uniform', 0); %trim leading 0
HD = cellfun(@(C) C(find(C,1):end), HD, 'uniform', 0); %trim leading 0
Hsos = cellfun(@tf2sos, HN, HD, 'uniform', 0).';
celldisp(Hsos)
Hsos{1} = 1.0000 0.7500 2.2500 1.0000 0.7500 -1.0000 Hsos{2} = 1.0000 0.7500 -1.0000 1.0000 0.7500 2.2500

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeDownloads についてさらに検索

製品


リリース

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by