Dealing With Fixed Point Fractions
Fixed point fractional representation always gives me a headache because I screw it up the first time I try to implement an algorithm. The difference between integer operations and fractional operations is in the overflow. If the representation fits in the fixed point result, you can not tell the difference between fixed point integer and fixed point fractions. When integers overflow, they lose data off the most significant bits. When fractions overflow, they lose data off...
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 Verilog-A in their...
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...
'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'...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...
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...
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 about this website is that when browse through the systems design section, you usually find a...
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...
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...
Feedback Controllers - Making Hardware with Firmware. Part 9. Closing the low-latency loop
It's time to put together the DSP and feedback control sciences, the evaluation electronics, the Intel Cyclone floating-point FPGA algorithms and the built-in control loop test-bed and evaluate some example designs. We will be counting the nanoseconds and looking for textbook performance in the creation of emulated hardware circuits. Along the way, there is a printed circuit board (PCB) issue to solve using DSP.
Fig 1. The evaluation platform
Additional design...
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...
Feedback Controllers - Making Hardware with Firmware. Part 5. Some FPGA Aspects.
This part of the on-going series of articles looks at a variety of aspects concerning the FPGA device which provides the high-speed maths capability for the low-latency controller and the arbitrary circuit generator application. In due course a complete specification along with application examples will be maintained on the project website here.- Part 5: Some FPGA Aspects (this part)
- Part 4: Engineering of...
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 this...
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...
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...
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 about this website is that when browse through the systems design section, you usually find a...
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...
'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'...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...
Feedback Controllers - Making Hardware with Firmware. Part 4. Engineering of Evaluation Hardware
Following on from the previous abstract descriptions of an arbitrary circuit emulation application for low-latency feedback controllers, we now come to some aspects in the hardware engineering of an evaluation design from concept to first power-up. In due course a complete specification along with application examples will be maintained on the project website.- Part 1: Introduction
- Part 2:...
Feedback Controllers - Making Hardware with Firmware. Part 5. Some FPGA Aspects.
This part of the on-going series of articles looks at a variety of aspects concerning the FPGA device which provides the high-speed maths capability for the low-latency controller and the arbitrary circuit generator application. In due course a complete specification along with application examples will be maintained on the project website here.- Part 5: Some FPGA Aspects (this part)
- Part 4: Engineering of...
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...
'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'...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...
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!
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...
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...
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 about this website is that when browse through the systems design section, you usually find a...