Odd Order Passive Elliptic
Main Software Page

```10 PRINT "SYMMETRICAL ELLIPTIC FILTER, C&S12/78, 1009"
20 DEFDBL A-H,O-Z
1010 DIM B(16),C(16),D(16),E(15),F(30)
1020 DN=LOG(10)/10:PI=3.1415926#
1030 PRINT "STOPBAND EDGE = ";:INPUT FS
1040 FS = FS/1000
1050 PRINT "PASSBAND EDGE = ";:INPUT FP
1060 FP=FP/1000
1070 IF ABS(FS-FP)<=0 THEN GOTO 1030
2040 PRINT "NUMBER OF PEAKS (1-15) = ";:INPUT N
2050 IF N<=0 THEN GOTO 2040
2060 M=2*N+1
2080 FC=SQR(FS*FP)
2090 R=FC+FC
2100 FOR K = 1 TO 2
2110 S=FS+FP
2120 FOR J = 1 TO 6
2130 P=SQR(S*R)
2140 S=(S+R)/2
2150 IF 1E+08*(S-P)<(S) THEN GOTO 2170
2160 R=P:NEXT J
2170 IF K >=2 THEN GOTO 2200
2180 Q=M/S
2190 R=ABS(FS-FP):NEXT K
2200 Q=Q*S
2210 S=EXP(-PI/Q)
2220 Y=S
2230 PRINT "CRITICAL Q =";CSNG(Q/(4*(1-S)*S^N))
2250 PRINT "STOPBAND REJECTION IN DB = ";:INPUT S
2260 IF S <=0 THEN GOTO 1030
2270 S=EXP(S*DN/2)
2280 R=EXP(PI*Q)
2290 P=(LOG(1+(S*S-1)/(R/4+1/R)^2))/DN
2310 R=R/(2*(S+SQR(S*S-1)))
2320 R=LOG(R+SQR(R*R+1))/(2*Q)
2330 R=SIN(R)/COS(R)
2340 W=R
2360 PRINT "3 DB (KHZ) ABOUT = ";FP+(FS-FP)/(1+FC/(FP*R*R))
2365 PRINT "NOMINAL OHMS RESISTANCE = ";:INPUT R
2370 IF R <=0 THEN GOTO 2365
2390 Z=Y:E(N)=W:W=W*W
2400 FOR J = 1 TO M-1
2410 F(J) =1:NEXT J
2420 K=1
2430 FOR J = 1 TO 1024
2440 F(K)=F(K)*(1-Z)/(1+Z)
2450 IF K < M-1 THEN GOTO 2500
2460 Z=Z*Y
2470 X = (( 1-Z )/(1+Z))^2
2480 E(N)=E(N)*(W+X)/(1+W*X)
2490 K=0
2500 Z=Z*Y
2510 IF Z < 2.5E-19 THEN GOTO 2530
2520 K = K + 1: NEXT J
2530 FOR J = 1 TO N
2540 F(J)=F(J)*F(M-J)
2550 F(M-J)=F(J):NEXT J
3010 FOR J = 1 TO N
3020 D(J)=F(2*J)*(1-F(J)^4)/F(J)
3030 B(J) = E(N)*F(J): NEXT J
3040 C(1) = 1/B(N)
3050 FOR J = 1 TO N-1
3060 C(J+1) = (C(J) - B(N-J))/(1+C(J)*B(N-J))
3070 E(N-J) = E(N+1-J) + E(N)*D(J)/      (1+B(J)*B(J)):NEXT J
4010 FOR J = 1 TO N
4020 B(J) = ((1+C(J)*C(J))*E(J)/D(J)-C(J)/F(J))/2
4030 C(J)=C(J)*F(J)
4040 D(J)=F(J)*F(J):NEXT J
4050 B(N+1) = B(N):C(N+1)=C(N):D(N+1) = D(N)
5010 IF N = 1 THEN GOTO 6020
5020 L = 1
5030 FOR K = L + 2 TO N+1 STEP 2
5040 FOR J = L TO K-2 STEP 2
5050 Y=C(J)-C(K)
5060 Z=1/(Y/(B(J)*(D(K)-D(J)))-1)
5070 B(K) = (B(K)-B(J))*Z*Z - B(J)*(1+Z+Z)
5080 C(K) = Y*Z: NEXT J
5081 NEXT K
5082 IF L = 2 THEN GOTO 6010
5083 L=2: GOTO 5030
6010 S=B(N)/B(N+1)-1
6020 Q = .0005/(PI*FC)
6030 P=Q*R:Q=Q/R
6040 IF FS<(FP) THEN GOTO 6150
6060 PRINT "                 LOW PASS FILTER"
6070 FOR J = 1 TO N
6080 C(J)=Q*C(J)
6090 D(J)=Q*B(J)*D(J)
6100 B(J)=P/B(J)
6110 F(J)= FC/F(J):NEXT J
6120 C(N+1) = Q*C(N+1)
6130 GOTO 6220
6150 PRINT "                  HIGH PASS FILTER"
6160 FOR J = 1 TO N
6170 C(J)=Q/C(J)
6180 D(J)=Q/(B(J)*D(J))
6190 B(J)=P*B(J)
6200 F(J)=FC*F(J):NEXT J
6210 C(N+1)=Q*C(N+1)
6220 PRINT "          KHZ                         FARAD             HENRY"
6230 FOR J = 1 TO N STEP 2
6240 PRINT TAB(27);CSNG(C(J))
6260 PRINT CSNG(F(J));J;CSNG(B(J));CSNG(D(J)):NEXT J
6270 PRINT TAB(27);CSNG(C(N+1))
6280 IF N = 1 THEN STOP
6290 L=(INT((N+1)/2))*2:K=M-1-L
6300 FOR J = L + 2 TO M-1 STEP 2
6310 PRINT CSNG(F(K));K;CSNG(B(K));CSNG(D(K))
6320 PRINT TAB(27);CSNG(C(K))
6330 K=K-2:NEXT J
6340 PRINT "PRECISION TEST: ";S
7020 STOP
```
The following example corresponds to Figure 7.6, Table 7.2, , and example 7.5 for an elliptic type-s implementation. Passband edge and stopband edge frequencies are given in Hertz corresponding to a normalized passband edge of 1 radian/sec and a stopband edge of 1.0254313 radians/sec.
```For type-s

Stopband Edge = ? 0.1632072
Passband Edge = ? 0.159155
Number of Peaks (1-15) = ? 3
CRITICAL Q = 82.5433
Stopband rejection in Db = ? 40
3 db (Khz) about = 1.593657924521486D-04
Nominal ohms resistance = ? 1