LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pole zero

I need to calculate IIR filter coefficients to be used in Labview starting from s-domain num/den  transfer functions. The filters I need are really a lot.
I have the Digital Filter Design toolikit, but it accepts only Zero-poles in z plane.
I also have the Control Design toolkit, that I'm using in order to convert my transfer functions from s-domain num/den to Zero-Pole discrete representation. Unfortunately results I get don't work at all (that is the filters designed are very different than expected).
Substantially I need to recreate the piece of software in matlab as follows.
 
Is there anyone who can help me?
thanks in advance
 
giovanni
 
 
 
function y = myfilter(x,fs)

% y output signal,
% x input signal,
% fs sampling frequency Hz
% bilinear transformation algorithm is used
f1 = 0.4;
f2 = 100;
f3 = 12.5;
f4 = 12.5;
Q4 = 0.63;
f5 = 2.37;
Q5 = 0.91;
f6 = 3.35;
Q6 = 0.91;
% Note that in the function “butter” the variables Q1 and Q2 are
% effectively set to equal to 1/sqrt(2), therefore they don’t need
% to be explicitly set here.
w3 = 2*pi*f3;
w4 = 2*pi*f4;
w5 = 2*pi*f5;
w6 = 2*pi*f6;
nyq = fs/2; % Nyquist frequency
% determine parameters for first filter
[b1,a1] = butter(2,f1/nyq,'high'); % High pass
[b2,a2] = butter(2,f2/nyq); % Low pass
% determine parameters for second filter
B3 = [1/w3 1];
A3 = [1/w4/w4 1/Q4/w4 1];
[b3,a3] = bilinear(B3,A3,fs);
% determine parameters for third filter
B4 = [1/w5/w5 1/Q5/w5 1]*w5*w5/w6/w6;
A4 = [1/w6/w6 1/Q6/w6 1];
[b4,a4] = bilinear(B4,A4,fs);
% Apply filter to input signal vector x (output to signal vector y)
y = filter(b2,a2,x);
y = filter(b1,a1,y);
y = filter(b3,a3,y);
y = filter(b4,a4,y);
0 Kudos
Message 1 of 2
(2,660 Views)
Hi,

try to see the following link: DSP Laboratory: IIR Filter Design via the Bilinear Transformation

http://cnx.rice.edu/content/m13039/latest/

I hope this can help you.

The bilinear function is an alghoritmic transormation native of matlab language, so it has been implemented in other languages.

Best Regards

LencioniM

0 Kudos
Message 2 of 2
(2,612 Views)