## A poor man's Simulink

Glue between Octave and NGSPICE for discrete- and continuous time cosimulation (download) Keywords: Octave, SPICE, Simulink

IntroductionMany DSP problems have close ties with the analog world. For example, a switched-mode audio power amplifier uses a digital control loop to open and close power transistors driving an analog filter. There are commercial tools for digital-analog cosimulation: Simulink comes to mind, and mainstream EDA vendors support VHDL-AMS or...

## Finding the Best Optimum

When I was in school learning electrical engineering I owned a large mental pot, full of simmering resentment against the curriculum as it was being taught.

It really started in my junior year, when we took Semiconductor Devices, or more accurately "how to build circuits using transistors". I had been seduced by the pure mathematics of sophomore EE courses, where all the circuit elements (resistors, capacitors, coils and -- oh the joy -- dependent sources) are ideally modeled, and the labs were all carefully constructed to not push against the limits of the models (coils never...

## 'z' as in 'Zorro': Frequency Masking FIR

An efficient way to implement FIR filters. Matlab / Octave example included. Keywords: Frequency masking FIR filter implementation

IntroductionAn "upsampled" FIR filter uses multiple-sample delays between the taps, compared to the unity delays in a conventional FIR filter. The resulting frequency response has steeper edges, but contains periodic images along the frequency axis (Fig. 1). Due to the latter, it is typically not too useful on its own.

Figure 1: Conventional and 'upsampled' FIRThe so-called "interpolated" FIR, or "IFIR" [2] adds a second stage to remove...

## Weighted least-squares FIR with shared coefficients

FIR design with arbitrary routing between delay line and coefficient multipliers.

Includes a commented implementation of a generic IRLS FIR design algorithm.

Introduction: Reverse EngineeringWhile looking for numerical IIR filter optimization, a Matlab program in [1] for the design of FIR filters caught my attention. The equations looked familiar, sort of, but on closer examination the pieces refused to fit together. Without the references, it took about two evenings to sort out how it works. And it worked in quite a different way than I had expected (maybe there is...

## DSP Algorithm Implementation: A Comprehensive Approach

As DSP engineers, ultimately we are required to design and implement specific DSP algorithms. The first step is to make a choice on which algorithm to use, e.g. for filtering should we use FIR or IIR. Then we can go a little bit deeper into the, high level, implementation details, e.g. use the symmetry in FIR filter to reduce complexity. When the algorithm is clear, the first step is to test and simulate the algorithm in a high level language like MATLAB.

After we reach confidence in our algorithm we move to the harder phase, which is the implementation. The difficulty...

## Fitting Filters to Measured Amplitude Response Data Using invfreqz in Matlab

This blog post has been moved to the code snippet section and can now be found HERE. Please update your bookmark. Thanks!

## Knowledge Mine for Embedded Systems

I stumbled upon a great website (actually I found it on the google ads in gmail!) with comprehensive and deep information on embedded systems. The website talks about four main categories in embedded systems:

1) Embedded Systems Design.

2) Design Life cycle.

3) Design Methods.

4) Design Tools.

What I found special...

## Accelerating Matlab DSP Code on the GPU

Intrigued by GPUs, I've spent a few days testing out Jacket, an interface that lets you accelerate MATLAB (my favorite, if frustrating language) on NVIDIA GPUs. It's definitely got some caveats. But it was really easy to accelerate my code. And the results were impressive. So I thought I'd put up a few simple DSP-related benchmarks I created and ran on my laptop (a Macbook Air with NVIDIA GeForce 9400M graphics card). The m-files for the two functions I benchmarked (2D FFT and 2D interpolation) can be...

## Of Forests and Trees and DSP

When Stephane invited me to write a blog for dsprelated.com I immediately came up with a flood of ideas for highly detailed, technical, narrowly focused articles related to the intersection of DSP and control systems.

Then the USENET groups that I frequent received a spate of posts from people that were either asking about how to implement highly detailed, narrowly focused algorithms in ways that were either fundamental misapplications or were flawed because they were having problems with some neglected detail of the application.

So I thought I would rant a little bit...

## ES Week Emphasis on Component Based Design

Howdy everyone from beautiful Salzburg/Austria,

A week full of presentations on embedded systems at ESWeek was quite a mindful. Similar to most academic conferences, there was only a few papers worth taking back home to think about. Amongst these were:

1. Keynote talk by Hermann Eul from Infineon: He presented Infineon's view on SDR and its evolution. This talk was quite inspirational. However the most interesting slide on complexity of SDR evolution was removed. I wish I could give...

## A poor man's Simulink

Glue between Octave and NGSPICE for discrete- and continuous time cosimulation (download) Keywords: Octave, SPICE, Simulink

IntroductionMany DSP problems have close ties with the analog world. For example, a switched-mode audio power amplifier uses a digital control loop to open and close power transistors driving an analog filter. There are commercial tools for digital-analog cosimulation: Simulink comes to mind, and mainstream EDA vendors support VHDL-AMS or...

## Weighted least-squares FIR with shared coefficients

FIR design with arbitrary routing between delay line and coefficient multipliers.

Includes a commented implementation of a generic IRLS FIR design algorithm.

Introduction: Reverse EngineeringWhile looking for numerical IIR filter optimization, a Matlab program in [1] for the design of FIR filters caught my attention. The equations looked familiar, sort of, but on closer examination the pieces refused to fit together. Without the references, it took about two evenings to sort out how it works. And it worked in quite a different way than I had expected (maybe there is...

## ES Week Emphasis on Component Based Design

Howdy everyone from beautiful Salzburg/Austria,

A week full of presentations on embedded systems at ESWeek was quite a mindful. Similar to most academic conferences, there was only a few papers worth taking back home to think about. Amongst these were:

1. Keynote talk by Hermann Eul from Infineon: He presented Infineon's view on SDR and its evolution. This talk was quite inspirational. However the most interesting slide on complexity of SDR evolution was removed. I wish I could give...

## Of Forests and Trees and DSP

When Stephane invited me to write a blog for dsprelated.com I immediately came up with a flood of ideas for highly detailed, technical, narrowly focused articles related to the intersection of DSP and control systems.

Then the USENET groups that I frequent received a spate of posts from people that were either asking about how to implement highly detailed, narrowly focused algorithms in ways that were either fundamental misapplications or were flawed because they were having problems with some neglected detail of the application.

So I thought I would rant a little bit...

## Finding the Best Optimum

When I was in school learning electrical engineering I owned a large mental pot, full of simmering resentment against the curriculum as it was being taught.

It really started in my junior year, when we took Semiconductor Devices, or more accurately "how to build circuits using transistors". I had been seduced by the pure mathematics of sophomore EE courses, where all the circuit elements (resistors, capacitors, coils and -- oh the joy -- dependent sources) are ideally modeled, and the labs were all carefully constructed to not push against the limits of the models (coils never...

## Accelerating Matlab DSP Code on the GPU

Intrigued by GPUs, I've spent a few days testing out Jacket, an interface that lets you accelerate MATLAB (my favorite, if frustrating language) on NVIDIA GPUs. It's definitely got some caveats. But it was really easy to accelerate my code. And the results were impressive. So I thought I'd put up a few simple DSP-related benchmarks I created and ran on my laptop (a Macbook Air with NVIDIA GeForce 9400M graphics card). The m-files for the two functions I benchmarked (2D FFT and 2D interpolation) can be...

## Knowledge Mine for Embedded Systems

I stumbled upon a great website (actually I found it on the google ads in gmail!) with comprehensive and deep information on embedded systems. The website talks about four main categories in embedded systems:

1) Embedded Systems Design.

2) Design Life cycle.

3) Design Methods.

4) Design Tools.

What I found special...

## Fitting Filters to Measured Amplitude Response Data Using invfreqz in Matlab

This blog post has been moved to the code snippet section and can now be found HERE. Please update your bookmark. Thanks!

## DSP Algorithm Implementation: A Comprehensive Approach

As DSP engineers, ultimately we are required to design and implement specific DSP algorithms. The first step is to make a choice on which algorithm to use, e.g. for filtering should we use FIR or IIR. Then we can go a little bit deeper into the, high level, implementation details, e.g. use the symmetry in FIR filter to reduce complexity. When the algorithm is clear, the first step is to test and simulate the algorithm in a high level language like MATLAB.

After we reach confidence in our algorithm we move to the harder phase, which is the implementation. The difficulty...

## 'z' as in 'Zorro': Frequency Masking FIR

An efficient way to implement FIR filters. Matlab / Octave example included. Keywords: Frequency masking FIR filter implementation

IntroductionAn "upsampled" FIR filter uses multiple-sample delays between the taps, compared to the unity delays in a conventional FIR filter. The resulting frequency response has steeper edges, but contains periodic images along the frequency axis (Fig. 1). Due to the latter, it is typically not too useful on its own.

Figure 1: Conventional and 'upsampled' FIRThe so-called "interpolated" FIR, or "IFIR" [2] adds a second stage to remove...