example.mws
A Simple Example of Lowpass Filter Design
Jan Bicak, Jiri Hospodka
This Maple worksheet demonstrates the use of
Syntfil
, package for analog filter design in Maple.
Load Syntfil
Approximation of filter frequency response
Input parameters of lowpass (LP) filter and the transformation to the normalized lowpass filter (NLP).
> 
x:=LP2NLP(fp,fs,ap,as);

Calculation of the order and a new stopband attenuations for the Chebyshev approximation.
> 
N:=ChebyshevNLPOrder(x);

Computation of the power transfer ratio and the characteristic function.
Computation of the transfer function poles for consecutive calculation of cascade parameters.
> 
Gc,poles:=ChebyshevPoles(N);

Plot the NLP transfer function magnitude.
> 
plot(MagnitudeHdB(1/G)(omega),omega=0..2,labels=["omega [1/s]","a [dB]"],thickness=2);

LC Ladderstype filter synthesis
Calculation of the LC ladder elements (function parameters: termination
of the filter on both sides  common, value of the resistor on source side R1=1, starting from the source side  front, using the PInetwork and parameters of the filter

,
).
> 
elems_NLP:=DroppNLP(common,R1,front,PI,G,phi);

General structures of LC ladders of filters calculated (a) as a T or (b) as a PInetworks.
The structure of LC ladders of NLP filter calculated above.
Analysis of the obtained structure  computig of the NLP transfer function, magnitude, and its plot.
> 
H_NLP:=MakeH(elems_NLP);

> 
mg_NLP:=MagnitudeHdB(H_NLP)(omega):

> 
plot(mg_NLP,omega=0..2,labels=["omega [1/s]","a [dB]"],thickness=2);

Impedance and frequency transformation  calculation of the real elements of the LC ladders of the desired lowpass. The filter structure is the same as the structure of the NLP filter shown above.
> 
elems_LP:=ElemsLP(elems_NLP,R,fp);

Analysis of the resulted structure  calculation of the LC ladders transfer function and the plot of the calculated frequency response.
> 
mg_LP:=MagnitudeHdB(H_LP)(2*Pi*f):

> 
plot(mg_LP,f=0..2000,labels=["f [Hz]","a [dB]"],thickness=2);

Cascade synthesis and realization of the active RC filter
Computing of cascade parameters of the required lowpass filter (
and
of the particular biquadratic transfer functions).
> 
lp:=NLP2LP(fp,Gc,poles);

Plot of the cascade filter frequency response must be of course the same as above.
> 
mg_LP_C:=MagnitudeHdB(H_LP_C)(2*Pi*f):

> 
plot(mg_LP_C,f=0..2000,labels=["f [Hz]","a [dB]"],thickness=2);

Synthesis of particular biquads  choice of circuit types and calculations of part values. Design algorithm can be changed by the
ARCSynt
function parameters  some part values (usually capacitors), parameters of operational amplifiers ([
,
]), total gain of filter ([
]) and circuit type. All parameters can be entered as a number for all blocks or as a list, i.e. separately for each block.
ARCBlock1
function is always called for calculation of gain distribution in case of Syntfil light edition.
> 
ARC_lp:=ARCSynt(lp,table(['C1'=10e9,'C2'=[1e9,non],'h0'=1]));

Warning, ARCSynt in light edition uses only ARCBlock1 function for gain distribution. Dynamic of whole filter WILL NOT BE BALANCED
The filter is realized using two biquads connected to cascade, whereas both of the biquads are designed by LP1 circuit. Diagrams of all circuit types are shown
here
including optional parameters.
Analysis of resulted structure  compute transfer function magnitude of designed ARC filter and its plot.
> 
H_LP_ARC:=MakeH(ARC_lp,p):

> 
mg_LP_ARC:=MagnitudeHdB(H_LP_ARC)(2*Pi*f):

> 
plot(mg_LP_ARC,f=0..2000,labels=["f [Hz]","a [dB]"],thickness=2);

Analysis of filter dynamic conditions
Transfer function and magnitudes calculation for particular (two) blocks and after the blocks connected to cascade for ideal filter (see
ARCBlock
)
.
> 
H_LP_ARC_B:=seq(MakeH(ARC_lp[i],p),i=1..2):

> 
mg_LP_ARC_B:=seq(MagnitudeHdB(H_LP_ARC_B[i])(2*Pi*f),i=1..2):

> 
mg_LP_ARC_Bp:=seq(sum(mg_LP_ARC_B[i],i=1..j),j=1..2):

Frequency response of the
particular blocks (biquads). It is evident that gain is distributed uniformly  gain of all biquads is equal (for DC or low frequency).
> 
plot([mg_LP_ARC_B],f=0..2000,legend=["1","2"],color=[red,blue],labels=["f [Hz]","a [dB]"],thickness=2);

Frequency response of the transfer functions after the blocks connected to cascade
. It is evident that
dynamic conditions of entire filter are not balanced 
limitation of signal will be caused only by first block, therefore the dynamic range of complete filter will be smaller.
> 
plot([mg_LP_ARC_Bp],f=0..2000,legend=["1","2"],color=[red,blue],labels=["f [Hz]","a [dB]"],thickness=2);

Legal Notice: The copyright for this application is owned by the author(s). Neither Maplesoft nor the author are responsible for any errors contained within and are not liable for any damages resulting from the use of this material. This application is intended for noncommercial, nonprofit use only. Contact the author for permission if you wish to use this application in forprofit activities.