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!