From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Bilinear Transform Visualizer

Code and Documents

Attachment

Overview: Interactively visualize the bilinear transform that maps the continuous-time s-plane onto the discrete-time z-plane with the equation z = (1+s)/(1-s). The bilinear transform is used to transform continuous-time filter prototypes such as Butterworth and Chebyshev into discrete-time filters, and to do so free of aliasing because the entire left half of the s-plane is contained inside the unit circle of the z-plane.

bilinear transform visualizer -- front panel.png

 

Details: The s-plane on the left side of the display is the continuous-time interpretation of the complex plane. The horizontal real axis is sigma (s) and the vertical imaginary axis is omega (W); the latter is normally called the "jay-omega" axis. The symbol s defined as s = s+jW represents a specific location in the s-plane. The z-plane on the right side of the display is the discrete-time interpretation of the complex plane. No special names are used for the real and imaginary axes in the z-plane.

 

The VI front panel controls establish a grid in the s-plane which is then mapped to the z-plane according to the bilinear transform z = (1+s)/(1-s). Each s-plane line (or contour) maps to a corresponding contour in the z-plane. The "limit" controls establish the bounds on the s-plane grid while the "step" controls adjust the density of contours. Note that the display is limited to the left-half s-plane, that is, the region where transfer function poles must be located to ensure stable filter operation; this translates to the interior of the unit circle in the z-plane.

 

Demo: This tutorial video explains the bilinear transform in more detail and includes two demonstrations of this VI in action at 7:00 and 9:04:

 

Block Diagram: The VI uses an event structure to handle front-panel control changes in real time. The block diagram follows:

bilinear transform visualizer -- block dgm.png

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.