ASN Filter Script: a new paradigm in bespoke filter design

August 05, 2016 // By Sanjeev Sarpal, Advanced Solutions Nederland
The ASN Filter Script programming interface forms part of the ASN filter designer design tool, allowing designers a simple route to interactively designing bespoke filters, by entering their specifications as simple symbolic mathematical expressions.

Editor’s note; Earlier in 2016 we carried an item on ASN’s Filter Designer Tool , which attracted considerable attention from EDN Europe readers; that report noted; ...the package, for IIR and FIR filter design, offers and intuitive route to implementing digital filters that [ASN claims] represents the first significant advance in this class of tools for many years...a Windows-based package that assists with design of filters, primarily for implementation on processor targets, but also supporting floating point desktop algorithm development... structured to use an intuitive input approach that largely dispenses with entering parameters in text fields. Here, company director and algorithms and analytics specialist Sanjeev Sarpal describes an alternative method of executing filter design that also largely bypasses the high level of filter-specific expertise required by some conventional tools


The unique design experience offered by the tool enables users to create, analyse and verify their filter designs in a real-time interactive way, without the need of any complex mathematics. This new concept supersedes existing paradigms where design production was time consuming and restrictive.


Symbolic mathematics

ASN Filter Script allows designers to implement symbolic mathematical expressions directly. These may be definitions taken directly from textbooks, technical standards or even reference designs. As an example of simplicity and power of the language, consider the design of the following 2nd order IIR (infinite impulse response) notch filter, expressed as a conventional transfer function:



This transfer function may be simply mapped into the following Filter Script code:



Real-time interactivity

The scripting language offers designers the unique and powerful ability to modify parameters on-the-fly with the so-called interface variables, allowing for real-time updates of the resulting frequency response.


The complete code for the aforementioned transfer function is shown below, where the interface variable definition precedes the Main () section of the code.



The scripting language itself supports over 40 scientific commands and takes the best aspects