Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Increase the Dynamic Range and Precision of Digital.

Slides:



Advertisements
Similar presentations
Signal and System IIR Filter Filbert H. Juwono
Advertisements

©Alex Doboli 2006  Analog to Digital Converters Alex Doboli, Ph.D. Department of Electrical and Computer Engineering State University of New York at.
Bandpass Sigma-Delta Modulator Michael Vincent Brian McKinney ECEN5007.
Digital Filter Noise Why does the textbook tell us not to use direct form 2? LIGO-G v1 Matt Evans.
The World Leader in High Performance Signal Processing Solutions Audio ADC/DACs Primer David Hossack.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L02B Introduction to the RX-Arduino (Lab) Anthony.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Using a Renesas Code Generation Tool for RL78 Devices.
Department of Electrical & Computer Engineering 1 ES585a - Computer Based Power System Protection Course by Dr.T.S.Sidhu - Fall 2005 Class discussion presentation.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: CL06B Sensors Fundamentals Dragos Bogdan, MCU Application.
Mark Allie comp.dsp Signal to Noise and Numeric Range issues for Direct Form I & II IIR Filters on Modern Analog Devices and TI Digital Signal Processors.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Migrating from 8-to-32 bit Processors CC17I Kevin.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. A13C: Performing Digital Filtering on an MCU Kevin P King.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: You CAN Do Digital Filtering with an MCU! CC13B.
ID 413C: Can Touch This: Designing Capacitive-Based Touch Solutions Mark F Rodriguez Senior Engineering 13 October 2010 Version: 1.0 Xaplos Inc.
Renesas Electronics America Inc. ID 311L: PIC to R8C Converter David Hedley Staff AE, Applications Engineering 14 Oct 2010 Version: 1.1.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Increase the Dynamic Range and Precision of Digital Filters.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. An Introduction to e 2 studio.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Know your Precise Position with RX600 MCU.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Sensorless Vector Control with RL78G14.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID A15C: Application Code Reprogramming Using Different Serial.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 320L: Rapid RX600 System Development Using the RPDL and.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L13B David Hedley, Applications Engineer Advanced.
Renesas Electronics America Inc. “© 2010 Renesas Electronics America Inc. All rights reserved ID 220L: Hands-on Embedded Ethernet Design with an Open Source.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. 431L: Using a Graphics API to Create User Interface Components—Advanced.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 9L02I Software Development with an Open Source.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Migrating from CubeSuite+ to Eclipse.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. A11L: 78K0R Low Power MCU Hands-On Lab Bob Proctor Staff.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 2L03I RL78 Bluetooth Connectivity Anthony Harris,
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. A30L: Increase the Dynamic Range and Precision of Digital.
ID A16C: Outfitting Embedded Devices with Low Power Wireless Communications Design considerations for adding wireless communications to low power embedded.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: ADC Resolution: Myth and Reality Mitch Ferguson,
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. e 2 Studio – Getting Started.
DISP 2003 Lecture 6 – Part 2 Digital Filters 4 Coefficient quantization Zero input limit cycle How about using float? Philippe Baudrenghien, AB-RF.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Know your Precise Position with RX600 MCU Huangsheng.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Debugging on RX with IAR Embedded Workbench Micael.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. 113C: Migration to the RX600 Made Easy Life in the fast lane.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID630L: Becoming Familiar with Sensorless Vector Control.
Class ID: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Using Virtual EEPROM and Flash API for.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 011C: VELOCITY LAB TM Embedded Development Ecosystem Amrit.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. QuantiPhi for RH850 and RL78 - The Fastest Path from Idea.
Class ID: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Implementing Bootloaders on Renesas MCUs.
2L01I Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 2L02I CAN In A Day Carl Stenquist, Staff.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 434L: Incorporating a Capacitive Touch Interface into.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Audio Solutions on the RX MCU Family Mitch Ferguson,
© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Module Introduction Purpose  This training module provides an overview of the analog interfaces.
˜ SuperHeterodyne Rx ECE 4710: Lecture #18 fc + fLO fc – fLO -fc + fLO
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Advanced Debugging on the RX600.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Advanced E 2 Studio Topics.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: CC05B RX Project Configuration Tips John Breitenbach,
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Low Power Design Michael Thomas, Applications Engineer.
Quiz 1 Review. Analog Synthesis Overview Sound is created by controlling electrical current within synthesizer, and amplifying result. Basic components:
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 416C:SH-2A Graphics for Low- to Mid-level Graphics Applications.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L08I Migrating from CubeSuite+ to Eclipse Neelima.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 3L05I Advanced Debugging on the RX600 Fatih Peksenar.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: 5L08I Using the Renesas Graphics API to Create.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose:  This course provides an overview of the serial communication.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 322L:Advanced Debugging on the RX600 Brandon Hussey Applications.
Software Defined Radio PhD Program on Electrical Engineering Sampling Theory and Quantization José Vieira.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 421L: R8C Segment-LCD API Lab Bob Proctor Staff Engineer.
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID A10L:A Flexible Flash Rewrite Application Brandon Hussey.
Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: QuantiPhi for RH850 and RL78 - The Fastest Path.
ID 021L: Model Based Control Design and Auto-Code Generation using the R8C Christopher Myers Director of Software Development 12 October 2010 Version:
Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID 130L: Optimizing your SH2A Application Kevin P King Senior.
Chapter 6 Discrete-Time System. 2/90  Operation of discrete time system 1. Discrete time system where and are multiplier D is delay element Fig. 6-1.
Class ID: Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Using Software Building Blocks for Faster.
David Hedley Staff AE, Applications Engineering 12 Oct 2010
Everything You Ever Wanted to Know About Filters*
ID 325L: Getting Started with CubeSuite
Fixed-point Analysis of Digital Filters
Presentation transcript:

Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved. Class ID: Increase the Dynamic Range and Precision of Digital Filters by using an MCU’s FPU CL03I Kevin P King - Senior Staff Application Engineer

© 2012 Renesas Electronics America Inc. All rights reserved.2 Kevin P King Education Electrical Engineering, University of Lowell (Edward B Van Dusen Award for Academic Achievement) Thirty years of Embedded Design Experience (x86, HC05, HC11, 8051, Philips XA, Atmel AVR, Hitachi, Mitsubishi, etc.... Five years of Emulator design for MetaLink COP8, 68HC05, 68HC11, 8051 (multi-vendors), National CR16, Hitachi H8/500, etc... Multiple Quality Awards for Embedded Software & Hardware Development. Specialty is Embedded System Design - MCU firmware & hardware Senior Staff Application Engineer RX DSP Library Development Team Numerous Motor Control and Medical App notes 2010 Patent Award for Motor Control

© 2012 Renesas Electronics America Inc. All rights reserved.3 Renesas Technology & Solution Portfolio

© 2012 Renesas Electronics America Inc. All rights reserved.4 Microcontroller and Microprocessor Line-up Wide Format LCDs  Industrial & Automotive, 130nm  350µA/MHz, 1µA standby 44 DMIPS, True Low Power Embedded Security, ASSP 165 DMIPS, FPU, DSC 1200 DMIPS, Performance 1200 DMIPS, Superscalar 500 DMIPS, Low Power 165 DMIPS, FPU, DSC 25 DMIPS, Low Power 10 DMIPS, Capacitive Touch  Industrial & Automotive, 150nm  190µA/MHz, 0.3µA standby  Industrial, 90nm  200µA/MHz, 1.6µA deep standby  Automotive & Industrial, 90nm  600µA/MHz, 1.5µA standby  Automotive & Industrial, 65nm  600µA/MHz, 1.5µA standby  Automotive, 40nm  500µA/MHz, 35µA deep standby  Industrial, 40nm  200µA/MHz, 0.3µA deep standby  Industrial, 90nm  1mA/MHz, 100µA standby  Industrial & Automotive, 130nm  144µA/MHz, 0.2µA standby bit 8/16-bit

© 2012 Renesas Electronics America Inc. All rights reserved.5 ‘Enabling The Smart Society’ Challenge: “More and more sensors are required by our “smart” devices and reliable filtering is required to separate the signal from the noise.” Solution: “This lab will help you evaluate whether your Digital Filtering application requires the precision and performance of devices with Floating Point Units (FPU).” Wireless Module Doctor, your patient is in distress

© 2012 Renesas Electronics America Inc. All rights reserved.6 Lab Agenda System Block Diagram Analog filter Data Collection Filter Review View and Collect Data Fix “bad” FIR filter Implement Floating Point IIR Implement Fixed Point IIR Summary

© 2012 Renesas Electronics America Inc. All rights reserved.7 Hypothetical Filter Applications

© 2012 Renesas Electronics America Inc. All rights reserved.8 ADC Considerations - Benchmark Example RX63N allows triggering ADC from MTU2 (timer) DMAC transfers data to buffer © 2010 Renesas Electronics America Inc. All rights reserved. Using the HW assist to acquire and transfer data to buffer saves ~7% CPU BW Data gets “replaced” right here since We don’t have 15 Function Generators

© 2012 Renesas Electronics America Inc. All rights reserved.9 FIR Filters

© 2012 Renesas Electronics America Inc. All rights reserved.10 Filter Applications – The Boxcar Filter Very common to perform a “running” average Sum n samples, scale the output (usually divide by n) Recalculate each time one new sample comes in Very simple FIR called boxcar All coefficients equal to 1 Example of 8 kHz sampling rate, 8 tap FIR

© 2012 Renesas Electronics America Inc. All rights reserved.11 Filter Types - FIR Typically the gain = 1 Decimation can be on front or back end Lab: back-end decimation X[n] – Input samples nD – Decimation Factor Y”[n] – Decimated Output B[n] – Coefficients (multiplies) Z -1 – Delay elements (storage array)

© 2012 Renesas Electronics America Inc. All rights reserved.12 IIR Filters

© 2012 Renesas Electronics America Inc. All rights reserved.13 IIR Since round-off error in output feeds back IIR requires greater precision 16 bit precision typically sufficient for FIR IIR requires 32 bit precision 1 Floating point simplifies math Not as many IIR design tools b0,b1,b2,a0,a1

© 2012 Renesas Electronics America Inc. All rights reserved.14 Effects of Quantization Error

© 2012 Renesas Electronics America Inc. All rights reserved.15 Effects of Quantization Error

© 2012 Renesas Electronics America Inc. All rights reserved.16 Why use IIR Design 5 kHz bandpass Sampling rate 44 kHz Center Frequency - 5 kHz Passband - 1 kHz Stopband attenuation 40 dB Passband ripple = 2 dB FIR filter requires 132 taps: IIR filter only requires 17 taps (13 non-zero) Forward coefficients – 1,0,-4,0,6,0,-4,0,1 Feedback coefficients © 2010 Renesas Electronics America Inc. All rights reserved , , , ,

© 2012 Renesas Electronics America Inc. All rights reserved.17 Designing the Filter Programs like ScopeFIR or WinFilter allow simple design of the filter

© 2012 Renesas Electronics America Inc. All rights reserved.18 Frequency Response of 8 Tap 4 kHz Filter © 2010 Renesas Electronics America Inc. All rights reserved. -12dB line 20 dB attenuation at 8 kHz compared to 12 for analog filter

© 2012 Renesas Electronics America Inc. All rights reserved.19 Improved 4 kHz Filter © 2010 Renesas Electronics America Inc. All rights reserved. By using 14 taps notice the improved attenuation at 6 kHz

© 2012 Renesas Electronics America Inc. All rights reserved.20 Pop Quiz If I chose a sample rate of 20kHz and feed it into a FIR filter with decimation 4, what “sampling” frequency do I use when I am determining my coefficients? 20k 10k 5k None of the above Depends on where the decimation is. 5k if decimated on front end, 20k if decimated on back end

© 2012 Renesas Electronics America Inc. All rights reserved.21 Start the Lab Let us know if you get stuck on a step That is what the cheerful assistant is here for – to help Please refer to the lab handout and let’s get started!

© 2012 Renesas Electronics America Inc. All rights reserved.22 Checking Progress Evaluate Compile Design Filter

© 2012 Renesas Electronics America Inc. All rights reserved.23 Lab Questions, Section 1: 1.1 We are simulating full range ADC data. 1.2 ScopeDSP is restricted in the file data, so you need to log in a format tools can understand / read. 1.3 NO, many programs like Excel are flexible in the data they will accept.

© 2012 Renesas Electronics America Inc. All rights reserved.24 Lab Questions, Section 2: 2.1 We decimated at the output 2.2Filter 1 should have been a High pass filter showing more 1K than 50Hz 2.3 Approx 10db

© 2012 Renesas Electronics America Inc. All rights reserved.25 Lab Questions Section 2 2.4Filter 2 should have been a Low pass filter showing more 50Hz than 1kHz 2.2 About 10 db

© 2012 Renesas Electronics America Inc. All rights reserved.26 Lab Questions, Section 3: 3.1Any need to worry about “scaling”? No 3.2Do the new coefficients improve the filter? Yes 3.3How much improvement, if any did you realize by just changing coefficients? Should be about db

© 2012 Renesas Electronics America Inc. All rights reserved.27 Improved FIR output

© 2012 Renesas Electronics America Inc. All rights reserved.28 Lab Questions, Section 4: 4.1 MAC (MUL + ADD) 31 for “good” 31 tap FIR, 10 for good IIR (And you can probably do this in one bi-quad, so could be as low as 5). 4.2 FIR requires “n-1”, so 30 for the 31 tap filter (see diagram), IIR requires 4 for a direct form 1 bi-quad, so 8 total for the 2 stages of bi-quad.

© 2012 Renesas Electronics America Inc. All rights reserved.29 Lab Questions, Section 5: bit does not provide enough resolution, so it errors saying quantization error too high, choose higher resolution. 5.2Increase resolution to 32 bit Fixed Point or single precision floats. 5.3Should fundamentally look the same, although you should notice a little “raggedness” on the low end. 5.4Quantization error.

© 2012 Renesas Electronics America Inc. All rights reserved bit Fixed Point IIR Quantization Error

© 2012 Renesas Electronics America Inc. All rights reserved.31 IIR Low Pass fixed Point

© 2012 Renesas Electronics America Inc. All rights reserved.32 Lab Questions, Section 6: 5.5Divide by These should be about the same as the floating point IIR. 0x = 1.0f, 0x7FFFFFFF = f, (you changed manually) 0x = 1.0f, 0x94D25AE4 = , 0x2D1C6797 = Divide by x3201EBD9 = Hex makes it hard to determine actual value. 5.8??????

© 2012 Renesas Electronics America Inc. All rights reserved.33 Questions? Questions?

© 2012 Renesas Electronics America Inc. All rights reserved.34 Challenge: “More and more sensors are required by our “smart” devices and reliable filtering is required to separate the signal from the noise.” “This lab will help you evaluate whether your Digital Filtering application requires the precision and performance of devices with Floating Point Units (FPU).” Do you agree that we accomplished the above statement? ‘Enabling The Smart Society’ in Review…

© 2012 Renesas Electronics America Inc. All rights reserved.35 Please utilize the ‘Guidebook’ application to leave feedback or Ask me for the paper feedback form for you to use… Please Provide Your Feedback…

© 2012 Renesas Electronics America Inc. All rights reserved.36 Thank You!

© 2012 Renesas Electronics America Inc. All rights reserved.37 Appendix: Additional Information

© 2012 Renesas Electronics America Inc. All rights reserved.38 Resources ScopeFIR, ScopeIIR and ScopeDSP The Scientist and Engineer's Guide to Digital Signal Processing, copyright © by Steven W. Smith. For more information visit the book's website at: C. E. Shannon, "Communication in the presence of noise", Proc. Institute of Radio Engineers, vol. 37, no. 1, pp. 10–21, Jan Reprint as classic paper in: Proc. IEEE, vol. 86, no. 2, (Feb. 1998) C. E. ShannonReprint as classic paper in: Proc. IEEE, vol. 86, no. 2, (Feb. 1998)

Renesas Electronics America Inc. © 2012 Renesas Electronics America Inc. All rights reserved.