代码:
%% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ %% Output Info about this m-file fprintf(‘\n***********************************************************\n‘); fprintf(‘ <DSP using MATLAB> Problem 6.12 \n\n‘); banner(); %% ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ b = [0.05 -0.01 -0.13 0.00 0.13 0.01 -0.05]; a = [1.00 -0.77 1.59 -0.88 1.20 -0.35 0.31]; format short; fprintf(‘\nConvert DIRECT-form to PARALLEL-form : \n‘); [C, Bp, Ap] = dir2par(b, a) %C = 0; a11 = conv(Ap(1, :), Ap(2, :)) b11 = conv(Bp(1, :), Ap(2, :)) + conv(Bp(2, :), Ap(1, :)) b11 = [b11, zeros(1,length(a11)-length(b11))] b12 = -0.1613*a11 + b11 fprintf(‘\nConvert DIRECT-form to CASCADE-form : \n‘); [b0, Bc, Ac] = dir2cas(b12, a11) fprintf(‘\nConvert TF-form to SOS-form : \n‘); [sos, g] = tf2sos(b12, a11)
运行结果:
从题目给的图中看,总体是并联形式,并联第一部分是由两个二阶滤波器串联组成,然后再和第二部分并联。
首先由直接形式得到并联形式的系数:
该形式不是唯一的。
原文地址:https://www.cnblogs.com/ky027wh-sx/p/9634242.html
时间: 2024-10-11 14:15:07