Filter Z Transform Manipulation
16 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I usually design filters using the filterDesigner and then export its coefficients to the workspace to use in the script. However, now im trying to manipulate the filter I have. What i pretend to is I have a Low Pass filter and i want to observe what happens when I do H(z^2) or something like (0.1(1-z^-1)H(z)). How can i plot this having the original filter coefficients?
Thank you
EDIT: I've tried this:
freqz(test.Numerator.^2,1);
z = tf('z');
H = tf( 0.1 - 0.1*z^(-1), 'Variable','z^-1')
freqz(H*test.Numerator,1)
However i believe its far from correct and the last one simply doesn't work...
0 件のコメント
回答 (1 件)
Paul
2024 年 12 月 15 日 23:32
編集済み: Paul
2024 年 12 月 16 日 14:52
Define a filiter in Signal Processing Toolbox (SPT) and plot the frequency response
fc = 300;
fs = 1000;
[b,a] = butter(6,fc/(fs/2));
figure
freqz(b,a,[],fs)
Convert to Control System Toolbox (CST) and plot the freqency response. Same as above accounting for 360 deg phase shift.
H = tf(b,a,1/fs,'Variable','z^-1');
figure
opts = bodeoptions;
opts.Freqscale = 'linear';
opts.FreqUnits = 'Hz';
opts.XLim = [0,fs/2];
bodeplot(H,opts),grid
bnew = conv(0.1*[1,-1],b);
figure
freqz(bnew,a,[],fs);
Same thing in the CST. Couldn't force the magnitude plot to have the same lower limit as above. Possible bug?
z = tf('z',1/fs);
figure
opts.MagLowerLimMode = 'manual';
opts.MagLowerLim = -120; % doesn't work? %10^(-120/20) also doesn't work?
bodeplot((0.1 - 0.1/z)*H,opts),grid
Implementing H(z^2) is doable, but I think would involve direct manipulation of b and a for the SPT, or the num and den properties of the tf in the CST (or we could detour into the Symbolic Toolbox I suppose).
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Filter Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!