$Title Linear Phase Lowpass Filter Design (FDESIGN,SEQ=379)
$ontext
This model finds the filter weights for a finite impulse response
(FIR) filter. We use rotated quadratic cones for the constraints.
This model is the minimax linear phase lowpass filter design from Lobo
et. al (Section 3.3) We model the nonlinear term 1/t in the model as
follows: introduce variables u,v, where v=2 (and u=1/t). Then 1/t can
be modeled as the quadratic cone
||[v, u-t]|| <= u+t, u,t >=0
Contributed by Michael Ferris, University of Wisconsin, Madison
Lobo, M S, Vandenberghe, L, Boyd, S, and Lebret, H, Applications of
Second Order Cone Programming. Linear Algebra and its Applications,
Special Issue on Linear Algebra in Control, Signals and Image
Processing. 284 (November, 1998).
$offtext
* N2 is half the length of the FIR filter (i.e. number of discretization points)
$if not set N2 $set N2 10
Scalar n2 /%N2%/;
Scalar n; n = 2*n2;
Scalar beta /0.01/;
Scalar omega_s; omega_s = 2*pi/3;
Scalar omega_p; omega_p = pi/2;
Scalar step; step = pi/180;
Sets i / 0*180/
omega_stop(i) /120*180/
omega_pass(i) / 0* 90/
k / 0*%N2%/;
Parameter omega(i);
omega(i) = [ord(i)-1]*step;
Variable
h(k)
t
v2 "for conic variable u-t"
v3 "for conic variable u+t";
Positive Variable u, v, v3;
Equation
passband_up_bnds(i)
cone_lhs, cone_rhs
so
passband_lo_bnds(i)
stopband_bnds(i)
stopband_bnds2(i);
passband_up_bnds(i)$omega_pass(i)..
2* sum(k$[ord(k)