How to cancel same pole-zero pair for Z-function ?

With matlab, How to cancel the same pole-zero pair for Z-function , for example : minreal for s-function?

 采纳的回答

The minreal function works with discrete systems.
Example —
n = [1 -9 26 -24];
d = [1 -12 41 -42];
tfs = tf(n,d);
figure
bode(tfs)
[ps,zs] = pzmap(tfs)
rs = minreal(tfs)
tfz = tf(n, d, 0.1)
figure
bode(tfz)
[pz1,zz1] = pzmap(tfz)
rz = minreal(tfz)
For the continuous system:
rs =
s - 4
-----
s - 7
and for the discrete system:
rz =
z - 4
-----
z - 7
In both, it cancels the poles-zeros at 2 and 3.

4 个评论

Script in Matlab as follows , NTF1=NTF2 by math, but run result : NTF1 <> NTF2, why????
fs=250e3;
z=tf([1 0],[1],1.0/fs,'Variable','z');
K1=1.0/2,K2=1.0/3,K3=1.0/2;
I1=1.0/(z-1),I2=z/(z-1);
NTF1=(1+K1*I1*(K1*I1+K1*I1*K2*I2))^-1; % this input mode is Convenience and liked
NTF2=tf([1 -3 3 -1],[1 -3 3+K1^2+K1^2*K2 -1-K1^2],1.0/fs,'Variable','z'); % this input mode isn't Convenience and liked
bode(NTF1,NTF2);
matlab运行结果:
NTF1 =
z^4 - 4 z^3 + 6 z^2 - 4 z + 1
----------------------------------------
z^4 - 4 z^3 + 6.333 z^2 - 4.583 z + 1.25
NTF2 =
z^3 - 3 z^2 + 3 z - 1
----------------------------
z^3 - 3 z^2 + 3.333 z - 1.25
The poles and zeros are not exactly the same in ‘NTF1’ and ‘NTF2’, so they are not exactly equal, and in ‘NTF1’ the pole and zero near 1+0j are not exactly the same, so minreal will not cancel them:
NTF1p = pole(NTF1)
NTF1z = zero(NTF1)
NTF2p = pole(NTF2)
NTF2z = zero(NTF2)
produces:
NTF1p =
1.109321664527059 + 0.607607613792185i
1.109321664527059 - 0.607607613792185i
1.000000000000006 + 0.000000000000000i
0.781356670945876 + 0.000000000000000i
NTF1z =
1.000219151659574 + 0.000000000000000i
0.999999983229428 + 0.000219134884851i
0.999999983229428 - 0.000219134884851i
0.999780881881574 + 0.000000000000000i
NTF2p =
1.109321664527060 + 0.607607613792186i
1.109321664527060 - 0.607607613792186i
0.781356670945880 + 0.000000000000000i
NTF2z =
1.000005497150145 + 0.000000000000000i
0.999997251424926 + 0.000004760605284i
0.999997251424926 - 0.000004760605284i
If you specify a tolerance, minreal will cancel the pole and zero in ‘NTF1’ at 1+j0:
NTF1m = minreal(NTF1, 0.001)
NFT2m = minreal(NTF2)
and the result is as expected:
NTF1m =
z^3 - 3 z^2 + 3 z - 1
----------------------------
z^3 - 3 z^2 + 3.333 z - 1.25
Sample time: 4e-06 seconds
Discrete-time transfer function.
NFT2m =
z^3 - 3 z^2 + 3 z - 1
----------------------------
z^3 - 3 z^2 + 3.333 z - 1.25
Sample time: 4e-06 seconds
Discrete-time transfer function.
so with the pole-zero cancellation, and the bode plot shows they are now the same:
bode(NTF1m, NFT2m)
Thank you !
I have get your thought ,but select appropriate tolerance for minreal isn't easy in reality!
Thanks again!
The Learner
My pleasure!
If my Answer helped you solve your problem, please Accept it!

请先登录,再进行评论。

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Scripts 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by