Analog Devices Introduction to Digital Filters - Analog Devices Chapitre 14 - Revenir à l'accueil

Farnell Element 14 :

Farnell-NA555-NE555-..> 08-Sep-2014 07:33 1.5M

Farnell-AD9834-Rev-D..> 08-Sep-2014 07:32 1.2M

Farnell-MSP430F15x-M..> 08-Sep-2014 07:32 1.3M

Farnell-AD736-Rev-I-..> 08-Sep-2014 07:31 1.3M

Farnell-AD8307-Data-..> 08-Sep-2014 07:30 1.3M

Farnell-Single-Chip-..> 08-Sep-2014 07:30 1.5M

Farnell-Quadruple-2-..> 08-Sep-2014 07:29 1.5M

Farnell-ADE7758-Rev-..> 08-Sep-2014 07:28 1.7M

Farnell-MAX3221-Rev-..> 08-Sep-2014 07:28 1.8M

Farnell-USB-to-Seria..> 08-Sep-2014 07:27 2.0M

Farnell-AD8313-Analo..> 08-Sep-2014 07:26 2.0M

Farnell-SN54HC164-SN..> 08-Sep-2014 07:25 2.0M

Farnell-AD8310-Analo..> 08-Sep-2014 07:24 2.1M

Farnell-AD8361-Rev-D..> 08-Sep-2014 07:23 2.1M

Farnell-2N3906-Fairc..> 08-Sep-2014 07:22 2.1M

Farnell-AD584-Rev-C-..> 08-Sep-2014 07:20 2.2M

Farnell-ADE7753-Rev-..> 08-Sep-2014 07:20 2.3M

Farnell-TLV320AIC23B..> 08-Sep-2014 07:18 2.4M

Farnell-AD586BRZ-Ana..> 08-Sep-2014 07:17 1.6M

Farnell-STM32F405xxS..> 27-Aug-2014 18:27 1.8M

Farnell-MSP430-Hardw..> 29-Jul-2014 10:36 1.1M

Farnell-LM324-Texas-..> 29-Jul-2014 10:32 1.5M

Farnell-LM386-Low-Vo..> 29-Jul-2014 10:32 1.5M

Farnell-NE5532-Texas..> 29-Jul-2014 10:32 1.5M

Farnell-Hex-Inverter..> 29-Jul-2014 10:31 875K

Farnell-AT90USBKey-H..> 29-Jul-2014 10:31 902K

Farnell-AT89C5131-Ha..> 29-Jul-2014 10:31 1.2M

Farnell-MSP-EXP430F5..> 29-Jul-2014 10:31 1.2M

Farnell-Explorer-16-..> 29-Jul-2014 10:31 1.3M

Farnell-TMP006EVM-Us..> 29-Jul-2014 10:30 1.3M

Farnell-Gertboard-Us..> 29-Jul-2014 10:30 1.4M

Farnell-LMP91051-Use..> 29-Jul-2014 10:30 1.4M

Farnell-Thermometre-..> 29-Jul-2014 10:30 1.4M

Farnell-user-manuel-..> 29-Jul-2014 10:29 1.5M

Farnell-fx-3650P-fx-..> 29-Jul-2014 10:29 1.5M

Farnell-2-GBPS-Diffe..> 28-Jul-2014 17:42 2.7M

Farnell-LMT88-2.4V-1..> 28-Jul-2014 17:42 2.8M

Farnell-Octal-Genera..> 28-Jul-2014 17:42 2.8M

Farnell-Dual-MOSFET-..> 28-Jul-2014 17:41 2.8M

Farnell-TLV320AIC325..> 28-Jul-2014 17:41 2.9M

Farnell-SN54LV4053A-..> 28-Jul-2014 17:20 5.9M

Farnell-TAS1020B-USB..> 28-Jul-2014 17:19 6.2M

Farnell-TPS40060-Wid..> 28-Jul-2014 17:19 6.3M

Farnell-TL082-Wide-B..> 28-Jul-2014 17:16 6.3M

Farnell-RF-short-tra..> 28-Jul-2014 17:16 6.3M

Farnell-maxim-integr..> 28-Jul-2014 17:14 6.4M

Farnell-TSV6390-TSV6..> 28-Jul-2014 17:14 6.4M

Farnell-Fast-Charge-..> 28-Jul-2014 17:12 6.4M

Farnell-NVE-datashee..> 28-Jul-2014 17:12 6.5M

Farnell-Excalibur-Hi..> 28-Jul-2014 17:10 2.4M

Farnell-Excalibur-Hi..> 28-Jul-2014 17:10 2.4M

Farnell-REF102-10V-P..> 28-Jul-2014 17:09 2.4M

Farnell-TMS320F28055..> 28-Jul-2014 17:09 2.7M

Farnell-MULTICOMP-Ra..> 22-Jul-2014 12:35 5.9M

Farnell-RASPBERRY-PI..> 22-Jul-2014 12:35 5.9M

Farnell-Dremel-Exper..> 22-Jul-2014 12:34 1.6M

Farnell-STM32F103x8-..> 22-Jul-2014 12:33 1.6M

Farnell-BD6xxx-PDF.htm 22-Jul-2014 12:33 1.6M

Farnell-L78S-STMicro..> 22-Jul-2014 12:32 1.6M

Farnell-RaspiCam-Doc..> 22-Jul-2014 12:32 1.6M

Farnell-SB520-SB5100..> 22-Jul-2014 12:32 1.6M

Farnell-iServer-Micr..> 22-Jul-2014 12:32 1.6M

Farnell-LUMINARY-MIC..> 22-Jul-2014 12:31 3.6M

Farnell-TEXAS-INSTRU..> 22-Jul-2014 12:31 2.4M

Farnell-TEXAS-INSTRU..> 22-Jul-2014 12:30 4.6M

Farnell-CLASS 1-or-2..> 22-Jul-2014 12:30 4.7M

Farnell-TEXAS-INSTRU..> 22-Jul-2014 12:29 4.8M

Farnell-Evaluating-t..> 22-Jul-2014 12:28 4.9M

Farnell-LM3S6952-Mic..> 22-Jul-2014 12:27 5.9M

Farnell-Keyboard-Mou..> 22-Jul-2014 12:27 5.9M

Farnell-Full-Datashe..> 15-Jul-2014 17:08 951K

Farnell-pmbta13_pmbt..> 15-Jul-2014 17:06 959K

Farnell-EE-SPX303N-4..> 15-Jul-2014 17:06 969K

Farnell-Datasheet-NX..> 15-Jul-2014 17:06 1.0M

Farnell-Datasheet-Fa..> 15-Jul-2014 17:05 1.0M

Farnell-MIDAS-un-tra..> 15-Jul-2014 17:05 1.0M

Farnell-SERIAL-TFT-M..> 15-Jul-2014 17:05 1.0M

Farnell-MCOC1-Farnel..> 15-Jul-2014 17:05 1.0M

Farnell-TMR-2-series..> 15-Jul-2014 16:48 787K

Farnell-DC-DC-Conver..> 15-Jul-2014 16:48 781K

Farnell-Full-Datashe..> 15-Jul-2014 16:47 803K

Farnell-TMLM-Series-..> 15-Jul-2014 16:47 810K

Farnell-TEL-5-Series..> 15-Jul-2014 16:47 814K

Farnell-TXL-series-t..> 15-Jul-2014 16:47 829K

Farnell-TEP-150WI-Se..> 15-Jul-2014 16:47 837K

Farnell-AC-DC-Power-..> 15-Jul-2014 16:47 845K

Farnell-TIS-Instruct..> 15-Jul-2014 16:47 845K

Farnell-TOS-tracopow..> 15-Jul-2014 16:47 852K

Farnell-TCL-DC-traco..> 15-Jul-2014 16:46 858K

Farnell-TIS-series-t..> 15-Jul-2014 16:46 875K

Farnell-TMR-2-Series..> 15-Jul-2014 16:46 897K

Farnell-TMR-3-WI-Ser..> 15-Jul-2014 16:46 939K

Farnell-TEN-8-WI-Ser..> 15-Jul-2014 16:46 939K

Farnell-Full-Datashe..> 15-Jul-2014 16:46 947K

Farnell-HIP4081A-Int..> 07-Jul-2014 19:47 1.0M

Farnell-ISL6251-ISL6..> 07-Jul-2014 19:47 1.1M

Farnell-DG411-DG412-..> 07-Jul-2014 19:47 1.0M

Farnell-3367-ARALDIT..> 07-Jul-2014 19:46 1.2M

Farnell-ICM7228-Inte..> 07-Jul-2014 19:46 1.1M

Farnell-Data-Sheet-K..> 07-Jul-2014 19:46 1.2M

Farnell-Silica-Gel-M..> 07-Jul-2014 19:46 1.2M

Farnell-TKC2-Dusters..> 07-Jul-2014 19:46 1.2M

Farnell-CRC-HANDCLEA..> 07-Jul-2014 19:46 1.2M

Farnell-760G-French-..> 07-Jul-2014 19:45 1.2M

Farnell-Decapant-KF-..> 07-Jul-2014 19:45 1.2M

Farnell-1734-ARALDIT..> 07-Jul-2014 19:45 1.2M

Farnell-Araldite-Fus..> 07-Jul-2014 19:45 1.2M

Farnell-fiche-de-don..> 07-Jul-2014 19:44 1.4M

Farnell-safety-data-..> 07-Jul-2014 19:44 1.4M

Farnell-A-4-Hardener..> 07-Jul-2014 19:44 1.4M

Farnell-CC-Debugger-..> 07-Jul-2014 19:44 1.5M

Farnell-MSP430-Hardw..> 07-Jul-2014 19:43 1.8M

Farnell-SmartRF06-Ev..> 07-Jul-2014 19:43 1.6M

Farnell-CC2531-USB-H..> 07-Jul-2014 19:43 1.8M

Farnell-Alimentation..> 07-Jul-2014 19:43 1.8M

Farnell-BK889B-PONT-..> 07-Jul-2014 19:42 1.8M

Farnell-User-Guide-M..> 07-Jul-2014 19:41 2.0M

Farnell-T672-3000-Se..> 07-Jul-2014 19:41 2.0M

Farnell-0050375063-D..> 18-Jul-2014 17:03 2.5M

Farnell-Mini-Fit-Jr-..> 18-Jul-2014 17:03 2.5M

Farnell-43031-0002-M..> 18-Jul-2014 17:03 2.5M

Farnell-0433751001-D..> 18-Jul-2014 17:02 2.5M

Farnell-Cube-3D-Prin..> 18-Jul-2014 17:02 2.5M

Farnell-MTX-Compact-..> 18-Jul-2014 17:01 2.5M

Farnell-MTX-3250-MTX..> 18-Jul-2014 17:01 2.5M

Farnell-ATtiny26-L-A..> 18-Jul-2014 17:00 2.6M

Farnell-MCP3421-Micr..> 18-Jul-2014 17:00 1.2M

Farnell-LM19-Texas-I..> 18-Jul-2014 17:00 1.2M

Farnell-Data-Sheet-S..> 18-Jul-2014 17:00 1.2M

Farnell-LMH6518-Texa..> 18-Jul-2014 16:59 1.3M

Farnell-AD7719-Low-V..> 18-Jul-2014 16:59 1.4M

Farnell-DAC8143-Data..> 18-Jul-2014 16:59 1.5M

Farnell-BGA7124-400-..> 18-Jul-2014 16:59 1.5M

Farnell-SICK-OPTIC-E..> 18-Jul-2014 16:58 1.5M

Farnell-LT3757-Linea..> 18-Jul-2014 16:58 1.6M

Farnell-LT1961-Linea..> 18-Jul-2014 16:58 1.6M

Farnell-PIC18F2420-2..> 18-Jul-2014 16:57 2.5M

Farnell-DS3231-DS-PD..> 18-Jul-2014 16:57 2.5M

Farnell-RDS-80-PDF.htm 18-Jul-2014 16:57 1.3M

Farnell-AD8300-Data-..> 18-Jul-2014 16:56 1.3M

Farnell-LT6233-Linea..> 18-Jul-2014 16:56 1.3M

Farnell-MAX1365-MAX1..> 18-Jul-2014 16:56 1.4M

Farnell-XPSAF5130-PD..> 18-Jul-2014 16:56 1.4M

Farnell-DP83846A-DsP..> 18-Jul-2014 16:55 1.5M

Farnell-Dremel-Exper..> 18-Jul-2014 16:55 1.6M

Farnell-MCOC1-Farnel..> 16-Jul-2014 09:04 1.0M

Farnell-SL3S1203_121..> 16-Jul-2014 09:04 1.1M

Farnell-PN512-Full-N..> 16-Jul-2014 09:03 1.4M

Farnell-SL3S4011_402..> 16-Jul-2014 09:03 1.1M

Farnell-LPC408x-7x 3..> 16-Jul-2014 09:03 1.6M

Farnell-PCF8574-PCF8..> 16-Jul-2014 09:03 1.7M

Farnell-LPC81xM-32-b..> 16-Jul-2014 09:02 2.0M

Farnell-LPC1769-68-6..> 16-Jul-2014 09:02 1.9M

Farnell-Download-dat..> 16-Jul-2014 09:02 2.2M

Farnell-LPC3220-30-4..> 16-Jul-2014 09:02 2.2M

Farnell-LPC11U3x-32-..> 16-Jul-2014 09:01 2.4M

Farnell-SL3ICS1002-1..> 16-Jul-2014 09:01 2.5M

Farnell-T672-3000-Se..> 08-Jul-2014 18:59 2.0M

Farnell-tesaÂ®pack63..> 08-Jul-2014 18:56 2.0M

Farnell-Encodeur-USB..> 08-Jul-2014 18:56 2.0M

Farnell-CC2530ZDK-Us..> 08-Jul-2014 18:55 2.1M

Farnell-2020-Manuel-..> 08-Jul-2014 18:55 2.1M

Farnell-Synchronous-..> 08-Jul-2014 18:54 2.1M

Farnell-Arithmetic-L..> 08-Jul-2014 18:54 2.1M

Farnell-NA555-NE555-..> 08-Jul-2014 18:53 2.2M

Farnell-4-Bit-Magnit..> 08-Jul-2014 18:53 2.2M

Farnell-LM555-Timer-..> 08-Jul-2014 18:53 2.2M

Farnell-L293d-Texas-..> 08-Jul-2014 18:53 2.2M

Farnell-SN54HC244-SN..> 08-Jul-2014 18:52 2.3M

Farnell-MAX232-MAX23..> 08-Jul-2014 18:52 2.3M

Farnell-High-precisi..> 08-Jul-2014 18:51 2.3M

Farnell-SMU-Instrume..> 08-Jul-2014 18:51 2.3M

Farnell-900-Series-B..> 08-Jul-2014 18:50 2.3M

Farnell-BA-Series-Oh..> 08-Jul-2014 18:50 2.3M

Farnell-UTS-Series-S..> 08-Jul-2014 18:49 2.5M

Farnell-270-Series-O..> 08-Jul-2014 18:49 2.3M

Farnell-UTS-Series-S..> 08-Jul-2014 18:49 2.8M

Farnell-Tiva-C-Serie..> 08-Jul-2014 18:49 2.6M

Farnell-UTO-Souriau-..> 08-Jul-2014 18:48 2.8M

Farnell-Clipper-Seri..> 08-Jul-2014 18:48 2.8M

Farnell-SOURIAU-Cont..> 08-Jul-2014 18:47 3.0M

Farnell-851-Series-P..> 08-Jul-2014 18:47 3.0M

Farnell-SL59830-Inte..> 06-Jul-2014 10:07 1.0M

Farnell-ALF1210-PDF.htm 06-Jul-2014 10:06 4.0M

Farnell-AD7171-16-Bi..> 06-Jul-2014 10:06 1.0M

Farnell-Low-Noise-24..> 06-Jul-2014 10:05 1.0M

Farnell-ESCON-Featur..> 06-Jul-2014 10:05 938K

Farnell-74LCX573-Fai..> 06-Jul-2014 10:05 1.9M

Farnell-1N4148WS-Fai..> 06-Jul-2014 10:04 1.9M

Farnell-FAN6756-Fair..> 06-Jul-2014 10:04 850K

Farnell-Datasheet-Fa..> 06-Jul-2014 10:04 861K

Farnell-ES1F-ES1J-fi..> 06-Jul-2014 10:04 867K

Farnell-QRE1113-Fair..> 06-Jul-2014 10:03 879K

Farnell-2N7002DW-Fai..> 06-Jul-2014 10:03 886K

Farnell-FDC2512-Fair..> 06-Jul-2014 10:03 886K

Farnell-FDV301N-Digi..> 06-Jul-2014 10:03 886K

Farnell-S1A-Fairchil..> 06-Jul-2014 10:03 896K

Farnell-BAV99-Fairch..> 06-Jul-2014 10:03 896K

Farnell-74AC00-74ACT..> 06-Jul-2014 10:03 911K

Farnell-NaPiOn-Panas..> 06-Jul-2014 10:02 911K

Farnell-LQ-RELAYS-AL..> 06-Jul-2014 10:02 924K

Farnell-ev-relays-ae..> 06-Jul-2014 10:02 926K

Farnell-ESCON-Featur..> 06-Jul-2014 10:02 931K

Farnell-Amplifier-In..> 06-Jul-2014 10:02 940K

Farnell-Serial-File-..> 06-Jul-2014 10:02 941K

Farnell-Both-the-Del..> 06-Jul-2014 10:01 948K

Farnell-Videk-PDF.htm 06-Jul-2014 10:01 948K

Farnell-EPCOS-173438..> 04-Jul-2014 10:43 3.3M

Farnell-Sensorless-C..> 04-Jul-2014 10:42 3.3M

Farnell-197.31-KB-Te..> 04-Jul-2014 10:42 3.3M

Farnell-PIC12F609-61..> 04-Jul-2014 10:41 3.7M

Farnell-PADO-semi-au..> 04-Jul-2014 10:41 3.7M

Farnell-03-iec-runds..> 04-Jul-2014 10:40 3.7M

Farnell-ACC-Silicone..> 04-Jul-2014 10:40 3.7M

Farnell-Series-TDS10..> 04-Jul-2014 10:39 4.0M

Farnell-03-iec-runds..> 04-Jul-2014 10:40 3.7M

Farnell-0430300011-D..> 14-Jun-2014 18:13 2.0M

Farnell-06-6544-8-PD..> 26-Mar-2014 17:56 2.7M

Farnell-3M-Polyimide..> 21-Mar-2014 08:09 3.9M

Farnell-3M-VolitionT..> 25-Mar-2014 08:18 3.3M

Farnell-10BQ060-PDF.htm 14-Jun-2014 09:50 2.4M

Farnell-10TPB47M-End..> 14-Jun-2014 18:16 3.4M

Farnell-12mm-Size-In..> 14-Jun-2014 09:50 2.4M

Farnell-24AA024-24LC..> 23-Jun-2014 10:26 3.1M

Farnell-50A-High-Pow..> 20-Mar-2014 17:31 2.9M

Farnell-197.31-KB-Te..> 04-Jul-2014 10:42 3.3M

Farnell-1907-2006-PD..> 26-Mar-2014 17:56 2.7M

Farnell-5910-PDF.htm 25-Mar-2014 08:15 3.0M

Farnell-6517b-Electr..> 29-Mar-2014 11:12 3.3M

Farnell-A-True-Syste..> 29-Mar-2014 11:13 3.3M

Farnell-ACC-Silicone..> 04-Jul-2014 10:40 3.7M

Farnell-AD524-PDF.htm 20-Mar-2014 17:33 2.8M

Farnell-ADL6507-PDF.htm 14-Jun-2014 18:19 3.4M

Farnell-ADSP-21362-A..> 20-Mar-2014 17:34 2.8M

Farnell-ALF1210-PDF.htm 04-Jul-2014 10:39 4.0M

Farnell-ALF1225-12-V..> 01-Apr-2014 07:40 3.4M

Farnell-ALF2412-24-V..> 01-Apr-2014 07:39 3.4M

Farnell-AN10361-Phil..> 23-Jun-2014 10:29 2.1M

Farnell-ARADUR-HY-13..> 26-Mar-2014 17:55 2.8M

Farnell-ARALDITE-201..> 21-Mar-2014 08:12 3.7M

Farnell-ARALDITE-CW-..> 26-Mar-2014 17:56 2.7M

Farnell-ATMEL-8-bit-..> 19-Mar-2014 18:04 2.1M

Farnell-ATMEL-8-bit-..> 11-Mar-2014 07:55 2.1M

Farnell-ATmega640-VA..> 14-Jun-2014 09:49 2.5M

Farnell-ATtiny20-PDF..> 25-Mar-2014 08:19 3.6M

Farnell-ATtiny26-L-A..> 13-Jun-2014 18:40 1.8M

Farnell-Alimentation..> 14-Jun-2014 18:24 2.5M

Farnell-Alimentation..> 01-Apr-2014 07:42 3.4M

Farnell-Amplificateu..> 29-Mar-2014 11:11 3.3M

Farnell-An-Improved-..> 14-Jun-2014 09:49 2.5M

Farnell-Atmel-ATmega..> 19-Mar-2014 18:03 2.2M

Farnell-Avvertenze-e..> 14-Jun-2014 18:20 3.3M

Farnell-BC846DS-NXP-..> 13-Jun-2014 18:42 1.6M

Farnell-BC847DS-NXP-..> 23-Jun-2014 10:24 3.3M

Farnell-BF545A-BF545..> 23-Jun-2014 10:28 2.1M

Farnell-BK2650A-BK26..> 29-Mar-2014 11:10 3.3M

Farnell-BT151-650R-N..> 13-Jun-2014 18:40 1.7M

Farnell-BTA204-800C-..> 13-Jun-2014 18:42 1.6M

Farnell-BUJD203AX-NX..> 13-Jun-2014 18:41 1.7M

Farnell-BYV29F-600-N..> 13-Jun-2014 18:42 1.6M

Farnell-BYV79E-serie..> 10-Mar-2014 16:19 1.6M

Farnell-BZX384-serie..> 23-Jun-2014 10:29 2.1M

Farnell-Battery-GBA-..> 14-Jun-2014 18:13 2.0M

Farnell-C.A-6150-C.A..> 14-Jun-2014 18:24 2.5M

Farnell-C.A 8332B-C...> 01-Apr-2014 07:40 3.4M

Farnell-CC2560-Bluet..> 29-Mar-2014 11:14 2.8M

Farnell-CD4536B-Type..> 14-Jun-2014 18:13 2.0M

Farnell-CIRRUS-LOGIC..> 10-Mar-2014 17:20 2.1M

Farnell-CS5532-34-BS..> 01-Apr-2014 07:39 3.5M

Farnell-Cannon-ZD-PD..> 11-Mar-2014 08:13 2.8M

Farnell-Ceramic-tran..> 14-Jun-2014 18:19 3.4M

Farnell-Circuit-Note..> 26-Mar-2014 18:00 2.8M

Farnell-Circuit-Note..> 26-Mar-2014 18:00 2.8M

Farnell-Cles-electro..> 21-Mar-2014 08:13 3.9M

Farnell-Conception-d..> 11-Mar-2014 07:49 2.4M

Farnell-Connectors-N..> 14-Jun-2014 18:12 2.1M

Farnell-Construction..> 14-Jun-2014 18:25 2.5M

Farnell-Controle-de-..> 11-Mar-2014 08:16 2.8M

Farnell-Cordless-dri..> 14-Jun-2014 18:13 2.0M

Farnell-Current-Tran..> 26-Mar-2014 17:58 2.7M

Farnell-Current-Tran..> 26-Mar-2014 17:58 2.7M

Farnell-Current-Tran..> 26-Mar-2014 17:59 2.7M

Farnell-Current-Tran..> 26-Mar-2014 17:59 2.7M

Farnell-DC-Fan-type-..> 14-Jun-2014 09:48 2.5M

Farnell-DC-Fan-type-..> 14-Jun-2014 09:51 1.8M

Farnell-Davum-TMC-PD..> 14-Jun-2014 18:27 2.4M

Farnell-De-la-puissa..> 29-Mar-2014 11:10 3.3M

Farnell-Directive-re..> 25-Mar-2014 08:16 3.0M

Farnell-Documentatio..> 14-Jun-2014 18:26 2.5M

Farnell-Download-dat..> 13-Jun-2014 18:40 1.8M

Farnell-ECO-Series-T..> 20-Mar-2014 08:14 2.5M

Farnell-ELMA-PDF.htm 29-Mar-2014 11:13 3.3M

Farnell-EMC1182-PDF.htm 25-Mar-2014 08:17 3.0M

Farnell-EPCOS-173438..> 04-Jul-2014 10:43 3.3M

Farnell-EPCOS-Sample..> 11-Mar-2014 07:53 2.2M

Farnell-ES2333-PDF.htm 11-Mar-2014 08:14 2.8M

Farnell-Ed.081002-DA..> 19-Mar-2014 18:02 2.5M

Farnell-F28069-Picco..> 14-Jun-2014 18:14 2.0M

Farnell-F42202-PDF.htm 19-Mar-2014 18:00 2.5M

Farnell-FDS-ITW-Spra..> 14-Jun-2014 18:22 3.3M

Farnell-FICHE-DE-DON..> 10-Mar-2014 16:17 1.6M

Farnell-Fastrack-Sup..> 23-Jun-2014 10:25 3.3M

Farnell-Ferric-Chlor..> 29-Mar-2014 11:14 2.8M

Farnell-Fiche-de-don..> 14-Jun-2014 09:47 2.5M

Farnell-Fiche-de-don..> 14-Jun-2014 18:26 2.5M

Farnell-Fluke-1730-E..> 14-Jun-2014 18:23 2.5M

Farnell-GALVA-A-FROI..> 26-Mar-2014 17:56 2.7M

Farnell-GALVA-MAT-Re..> 26-Mar-2014 17:57 2.7M

Farnell-GN-RELAYS-AG..> 20-Mar-2014 08:11 2.6M

Farnell-HC49-4H-Crys..> 14-Jun-2014 18:20 3.3M

Farnell-HFE1600-Data..> 14-Jun-2014 18:22 3.3M

Farnell-HI-70300-Sol..> 14-Jun-2014 18:27 2.4M

Farnell-HUNTSMAN-Adv..> 10-Mar-2014 16:17 1.7M

Farnell-Haute-vitess..> 11-Mar-2014 08:17 2.4M

Farnell-IP4252CZ16-8..> 13-Jun-2014 18:41 1.7M

Farnell-Instructions..> 19-Mar-2014 18:01 2.5M

Farnell-KSZ8851SNL-S..> 23-Jun-2014 10:28 2.1M

Farnell-L-efficacite..> 11-Mar-2014 07:52 2.3M

Farnell-LCW-CQ7P.CC-..> 25-Mar-2014 08:19 3.2M

Farnell-LME49725-Pow..> 14-Jun-2014 09:49 2.5M

Farnell-LOCTITE-542-..> 25-Mar-2014 08:15 3.0M

Farnell-LOCTITE-3463..> 25-Mar-2014 08:19 3.0M

Farnell-LUXEON-Guide..> 11-Mar-2014 07:52 2.3M

Farnell-Leaded-Trans..> 23-Jun-2014 10:26 3.2M

Farnell-Les-derniers..> 11-Mar-2014 07:50 2.3M

Farnell-Loctite3455-..> 25-Mar-2014 08:16 3.0M

Farnell-Low-cost-Enc..> 13-Jun-2014 18:42 1.7M

Farnell-Lubrifiant-a..> 26-Mar-2014 18:00 2.7M

Farnell-MC3510-PDF.htm 25-Mar-2014 08:17 3.0M

Farnell-MC21605-PDF.htm 11-Mar-2014 08:14 2.8M

Farnell-MCF532x-7x-E..> 29-Mar-2014 11:14 2.8M

Farnell-MICREL-KSZ88..> 11-Mar-2014 07:54 2.2M

Farnell-MICROCHIP-PI..> 19-Mar-2014 18:02 2.5M

Farnell-MOLEX-39-00-..> 10-Mar-2014 17:19 1.9M

Farnell-MOLEX-43020-..> 10-Mar-2014 17:21 1.9M

Farnell-MOLEX-43160-..> 10-Mar-2014 17:21 1.9M

Farnell-MOLEX-87439-..> 10-Mar-2014 17:21 1.9M

Farnell-MPXV7002-Rev..> 20-Mar-2014 17:33 2.8M

Farnell-MX670-MX675-..> 14-Jun-2014 09:46 2.5M

Farnell-Microchip-MC..> 13-Jun-2014 18:27 1.8M

Farnell-Microship-PI..> 11-Mar-2014 07:53 2.2M

Farnell-Midas-Active..> 14-Jun-2014 18:17 3.4M

Farnell-Midas-MCCOG4..> 14-Jun-2014 18:11 2.1M

Farnell-Miniature-Ci..> 26-Mar-2014 17:55 2.8M

Farnell-Mistral-PDF.htm 14-Jun-2014 18:12 2.1M

Farnell-Molex-83421-..> 14-Jun-2014 18:17 3.4M

Farnell-Molex-COMMER..> 14-Jun-2014 18:16 3.4M

Farnell-Molex-Crimp-..> 10-Mar-2014 16:27 1.7M

Farnell-Multi-Functi..> 20-Mar-2014 17:38 3.0M

Farnell-NTE_SEMICOND..> 11-Mar-2014 07:52 2.3M

Farnell-NXP-74VHC126..> 10-Mar-2014 16:17 1.6M

Farnell-NXP-BT136-60..> 11-Mar-2014 07:52 2.3M

Farnell-NXP-PBSS9110..> 10-Mar-2014 17:21 1.9M

Farnell-NXP-PCA9555 ..> 11-Mar-2014 07:54 2.2M

Farnell-NXP-PMBFJ620..> 10-Mar-2014 16:16 1.7M

Farnell-NXP-PSMN1R7-..> 10-Mar-2014 16:17 1.6M

Farnell-NXP-PSMN7R0-..> 10-Mar-2014 17:19 2.1M

Farnell-NXP-TEA1703T..> 11-Mar-2014 08:15 2.8M

Farnell-Nilï¬-sk-E-..> 14-Jun-2014 09:47 2.5M

Farnell-Novembre-201..> 20-Mar-2014 17:38 3.3M

Farnell-OMRON-Master..> 10-Mar-2014 16:26 1.8M

Farnell-OSLON-SSL-Ce..> 19-Mar-2014 18:03 2.1M

Farnell-OXPCIE958-FB..> 13-Jun-2014 18:40 1.8M

Farnell-PADO-semi-au..> 04-Jul-2014 10:41 3.7M

Farnell-PBSS5160T-60..> 19-Mar-2014 18:03 2.1M

Farnell-PDTA143X-ser..> 20-Mar-2014 08:12 2.6M

Farnell-PDTB123TT-NX..> 13-Jun-2014 18:43 1.5M

Farnell-PESD5V0F1BL-..> 13-Jun-2014 18:43 1.5M

Farnell-PESD9X5.0L-P..> 13-Jun-2014 18:43 1.6M

Farnell-PIC12F609-61..> 04-Jul-2014 10:41 3.7M

Farnell-PIC18F2455-2..> 23-Jun-2014 10:27 3.1M

Farnell-PIC24FJ256GB..> 14-Jun-2014 09:51 2.4M

Farnell-PMBT3906-PNP..> 13-Jun-2014 18:44 1.5M

Farnell-PMBT4403-PNP..> 23-Jun-2014 10:27 3.1M

Farnell-PMEG4002EL-N..> 14-Jun-2014 18:18 3.4M

Farnell-PMEG4010CEH-..> 13-Jun-2014 18:43 1.6M

Farnell-Panasonic-15..> 23-Jun-2014 10:29 2.1M

Farnell-Panasonic-EC..> 20-Mar-2014 17:36 2.6M

Farnell-Panasonic-EZ..> 20-Mar-2014 08:10 2.6M

Farnell-Panasonic-Id..> 20-Mar-2014 17:35 2.6M

Farnell-Panasonic-Ne..> 20-Mar-2014 17:36 2.6M

Farnell-Panasonic-Ra..> 20-Mar-2014 17:37 2.6M

Farnell-Panasonic-TS..> 20-Mar-2014 08:12 2.6M

Farnell-Panasonic-Y3..> 20-Mar-2014 08:11 2.6M

Farnell-Pico-Spox-Wi..> 10-Mar-2014 16:16 1.7M

Farnell-Pompes-Charg..> 24-Apr-2014 20:23 3.3M

Farnell-Ponts-RLC-po..> 14-Jun-2014 18:23 3.3M

Farnell-Portable-Ana..> 29-Mar-2014 11:16 2.8M

Farnell-Premier-Farn..> 21-Mar-2014 08:11 3.8M

Farnell-Produit-3430..> 14-Jun-2014 09:48 2.5M

Farnell-Proskit-SS-3..> 10-Mar-2014 16:26 1.8M

Farnell-Puissance-ut..> 11-Mar-2014 07:49 2.4M

Farnell-Q48-PDF.htm 23-Jun-2014 10:29 2.1M

Farnell-Radial-Lead-..> 20-Mar-2014 08:12 2.6M

Farnell-Realiser-un-..> 11-Mar-2014 07:51 2.3M

Farnell-Reglement-RE..> 21-Mar-2014 08:08 3.9M

Farnell-Repartiteurs..> 14-Jun-2014 18:26 2.5M

Farnell-S-TRI-SWT860..> 21-Mar-2014 08:11 3.8M

Farnell-SB175-Connec..> 11-Mar-2014 08:14 2.8M

Farnell-SMBJ-Transil..> 29-Mar-2014 11:12 3.3M

Farnell-SOT-23-Multi..> 11-Mar-2014 07:51 2.3M

Farnell-SPLC780A1-16..> 14-Jun-2014 18:25 2.5M

Farnell-SSC7102-Micr..> 23-Jun-2014 10:25 3.2M

Farnell-SVPE-series-..> 14-Jun-2014 18:15 2.0M

Farnell-Sensorless-C..> 04-Jul-2014 10:42 3.3M

Farnell-Septembre-20..> 20-Mar-2014 17:46 3.7M

Farnell-Serie-PicoSc..> 19-Mar-2014 18:01 2.5M

Farnell-Serie-Standa..> 14-Jun-2014 18:23 3.3M

Farnell-Series-2600B..> 20-Mar-2014 17:30 3.0M

Farnell-Series-TDS10..> 04-Jul-2014 10:39 4.0M

Farnell-Signal-PCB-R..> 14-Jun-2014 18:11 2.1M

Farnell-Strangkuhlko..> 21-Mar-2014 08:09 3.9M

Farnell-Supercapacit..> 26-Mar-2014 17:57 2.7M

Farnell-TDK-Lambda-H..> 14-Jun-2014 18:21 3.3M

Farnell-TEKTRONIX-DP..> 10-Mar-2014 17:20 2.0M

Farnell-Tektronix-AC..> 13-Jun-2014 18:44 1.5M

Farnell-Telemetres-l..> 20-Mar-2014 17:46 3.7M

Farnell-Termometros-..> 14-Jun-2014 18:14 2.0M

Farnell-The-essentia..> 10-Mar-2014 16:27 1.7M

Farnell-U2270B-PDF.htm 14-Jun-2014 18:15 3.4M

Farnell-USB-Buccanee..> 14-Jun-2014 09:48 2.5M

Farnell-USB1T11A-PDF..> 19-Mar-2014 18:03 2.1M

Farnell-V4N-PDF.htm 14-Jun-2014 18:11 2.1M

Farnell-WetTantalum-..> 11-Mar-2014 08:14 2.8M

Farnell-XPS-AC-Octop..> 14-Jun-2014 18:11 2.1M

Farnell-XPS-MC16-XPS..> 11-Mar-2014 08:15 2.8M

Farnell-YAGEO-DATA-S..> 11-Mar-2014 08:13 2.8M

Farnell-ZigBee-ou-le..> 11-Mar-2014 07:50 2.4M

Farnell-celpac-SUL84..> 21-Mar-2014 08:11 3.8M

Farnell-china_rohs_o..> 21-Mar-2014 10:04 3.9M

Farnell-cree-Xlamp-X..> 20-Mar-2014 17:34 2.8M

Farnell-cree-Xlamp-X..> 20-Mar-2014 17:35 2.7M

Farnell-cree-Xlamp-X..> 20-Mar-2014 17:31 2.9M

Farnell-cree-Xlamp-m..> 20-Mar-2014 17:32 2.9M

Farnell-cree-Xlamp-m..> 20-Mar-2014 17:32 2.9M

Farnell-ir1150s_fr.p..> 29-Mar-2014 11:11 3.3M

Farnell-manual-bus-p..> 10-Mar-2014 16:29 1.9M

Farnell-propose-plus..> 11-Mar-2014 08:19 2.8M

Farnell-techfirst_se..> 21-Mar-2014 08:08 3.9M

Farnell-testo-205-20..> 20-Mar-2014 17:37 3.0M

Farnell-testo-470-Fo..> 20-Mar-2014 17:38 3.0M

Farnell-uC-OS-III-Br..> 10-Mar-2014 17:20 2.0M

Sefram-7866HD.pdf-PD..> 29-Mar-2014 11:46 472K

Sefram-CAT_ENREGISTR..> 29-Mar-2014 11:46 461K

Sefram-CAT_MESUREURS..> 29-Mar-2014 11:46 435K

Sefram-GUIDE_SIMPLIF..> 29-Mar-2014 11:46 481K

Sefram-GUIDE_SIMPLIF..> 29-Mar-2014 11:46 442K

Sefram-GUIDE_SIMPLIF..> 29-Mar-2014 11:46 422K

Sefram-SP270.pdf-PDF..> 29-Mar-2014 11:46 464KIntroduction to Digital Filters Digital filters are used for two general purposes: (1) separation of signals that have been combined, and (2) restoration of signals that have been distorted in some way. Analog (electronic) filters can be used for these same tasks; however, digital filters can achieve far superior results. The most popular digital filters are described and compared in the next seven chapters. This introductory chapter describes the parameters you want to look for when learning about each of these filters. Filter Basics Digital filters are a very important part of DSP. In fact, their extraordinary performance is one of the key reasons that DSP has become so popular. As mentioned in the introduction, filters have two uses: signal separation and signal restoration. Signal separation is needed when a signal has been contaminated with interference, noise, or other signals. For example, imagine a device for measuring the electrical activity of a baby's heart (EKG) while still in the womb. The raw signal will likely be corrupted by the breathing and heartbeat of the mother. A filter might be used to separate these signals so that they can be individually analyzed. Signal restoration is used when a signal has been distorted in some way. For example, an audio recording made with poor equipment may be filtered to better represent the sound as it actually occurred. Another example is the deblurring of an image acquired with an improperly focused lens, or a shaky camera. These problems can be attacked with either analog or digital filters. Which is better? Analog filters are cheap, fast, and have a large dynamic range in both amplitude and frequency. Digital filters, in comparison, are vastly superior in the level of performance that can be achieved. For example, a low-pass digital filter presented in Chapter 16 has a gain of 1 +/- 0.0002 from DC to 1000 hertz, and a gain of less than 0.0002 for frequencies above 262 The Scientist and Engineer's Guide to Digital Signal Processing 1001 hertz. The entire transition occurs within only 1 hertz. Don't expect this from an op amp circuit! Digital filters can achieve thousands of times better performance than analog filters. This makes a dramatic difference in how filtering problems are approached. With analog filters, the emphasis is on handling limitations of the electronics, such as the accuracy and stability of the resistors and capacitors. In comparison, digital filters are so good that the performance of the filter is frequently ignored. The emphasis shifts to the limitations of the signals, and the theoretical issues regarding their processing. It is common in DSP to say that a filter's input and output signals are in the time domain. This is because signals are usually created by sampling at regular intervals of time. But this is not the only way sampling can take place. The second most common way of sampling is at equal intervals in space. For example, imagine taking simultaneous readings from an array of strain sensors mounted at one centimeter increments along the length of an aircraft wing. Many other domains are possible; however, time and space are by far the most common. When you see the term time domain in DSP, remember that it may actually refer to samples taken over time, or it may be a general reference to any domain that the samples are taken in. As shown in Fig. 14-1, every linear filter has an impulse response, a step response and a frequency response. Each of these responses contains complete information about the filter, but in a different form. If one of the three is specified, the other two are fixed and can be directly calculated. All three of these representations are important, because they describe how the filter will react under different circumstances. The most straightforward way to implement a digital filter is by convolving the input signal with the digital filter's impulse response. All possible linear filters can be made in this manner. (This should be obvious. If it isn't, you probably don't have the background to understand this section on filter design. Try reviewing the previous section on DSP fundamentals). When the impulse response is used in this way, filter designers give it a special name: the filter kernel. There is also another way to make digital filters, called recursion. When a filter is implemented by convolution, each sample in the output is calculated by weighting the samples in the input, and adding them together. Recursive filters are an extension of this, using previously calculated values from the output, besides points from the input. Instead of using a filter kernel, recursive filters are defined by a set of recursion coefficients. This method will be discussed in detail in Chapter 19. For now, the important point is that all linear filters have an impulse response, even if you don't use it to implement the filter. To find the impulse response of a recursive filter, simply feed in an impulse, and see what comes out. The impulse responses of recursive filters are composed of sinusoids that exponentially decay in amplitude. In principle, this makes their impulse responses infinitely long. However, the amplitude eventually drops below the round-off noise of the system, and the remaining samples can be ignored. Because Chapter 14- Introduction to Digital Filters 263 Frequency 0 0.1 0.2 0.3 0.4 0.5 -0.5 0.0 0.5 1.0 1.5 c. Frequency response Sample number 0 32 64 96 128 -0.1 0.0 0.1 0.2 127 a. Impulse response 0.3 Sample number 0 32 64 96 128 -0.5 0.0 0.5 1.0 1.5 127 b. Step response Frequency 0 0.1 0.2 0.3 0.4 0.5 -60 -40 -20 0 20 40 d. Frequency response (in dB) FIGURE 14-1 Filter parameters. Every linear filter has an impulse response, a step response, and a frequency response. The step response, (b), can be found by discrete integration of the impulse response, (a). The frequency response can be found from the impulse response by using the Fast Fourier Transform (FFT), and can be displayed either on a linear scale, (c), or in decibels, (d). FFT Integrate 20 Log( ) Amplitude Amplitude (dB) Amplitude Amplitude of this characteristic, recursive filters are also called Infinite Impulse Response or IIR filters. In comparison, filters carried out by convolution are called Finite Impulse Response or FIR filters. As you know, the impulse response is the output of a system when the input is an impulse. In this same manner, the step response is the output when the input is a step (also called an edge, and an edge response). Since the step is the integral of the impulse, the step response is the integral of the impulse response. This provides two ways to find the step response: (1) feed a step waveform into the filter and see what comes out, or (2) integrate the impulse response. (To be mathematically correct: integration is used with continuous signals, while discrete integration, i.e., a running sum, is used with discrete signals). The frequency response can be found by taking the DFT (using the FFT algorithm) of the impulse response. This will be reviewed later in this 264 The Scientist and Engineer's Guide to Digital Signal Processing dB ’ 10 log10 P2 P1 dB ’ 20 log10 A2 A1 EQUATION 14-1 Definition of decibels. Decibels are a way of expressing a ratio between two signals. Ratios of power (P1 & P2) use a different equation from ratios of amplitude (A1 & A2). chapter. The frequency response can be plotted on a linear vertical axis, such as in (c), or on a logarithmic scale (decibels), as shown in (d). The linear scale is best at showing the passband ripple and roll-off, while the decibel scale is needed to show the stopband attenuation. Don't remember decibels? Here is a quick review. A bel (in honor of Alexander Graham Bell) means that the power is changed by a factor of ten. For example, an electronic circuit that has 3 bels of amplification produces an output signal with 10×10×10 ’ 1000 times the power of the input. A decibel (dB) is one-tenth of a bel. Therefore, the decibel values of: -20dB, -10dB, 0dB, 10dB & 20dB, mean the power ratios: 0.01, 0.1, 1, 10, & 100, respectively. In other words, every ten decibels mean that the power has changed by a factor of ten. Here's the catch: you usually want to work with a signal's amplitude, not its power. For example, imagine an amplifier with 20dB of gain. By definition, this means that the power in the signal has increased by a factor of 100. Since amplitude is proportional to the square-root of power, the amplitude of the output is 10 times the amplitude of the input. While 20dB means a factor of 100 in power, it only means a factor of 10 in amplitude. Every twenty decibels mean that the amplitude has changed by a factor of ten. In equation form: The above equations use the base 10 logarithm; however, many computer languages only provide a function for the base e logarithm (the natural log, written log or ). The natural log can be use by modifying the above e x ln x equations: dB ’ 4.342945 log and . e (P2 /P1) dB ’ 8.685890 loge (A2 /A1) Since decibels are a way of expressing the ratio between two signals, they are ideal for describing the gain of a system, i.e., the ratio between the output and the input signal. However, engineers also use decibels to specify the amplitude (or power) of a single signal, by referencing it to some standard. For example, the term: dBV means that the signal is being referenced to a 1 volt rms signal. Likewise, dBm indicates a reference signal producing 1 mW into a 600 ohms load (about 0.78 volts rms). If you understand nothing else about decibels, remember two things: First, -3dB means that the amplitude is reduced to 0.707 (and the power is Chapter 14- Introduction to Digital Filters 265 60dB = 1000 40dB = 100 20dB = 10 0dB = 1 -20dB = 0.1 -40dB = 0.01 -60dB = 0.001 therefore reduced to 0.5). Second, memorize the following conversions between decibels and amplitude ratios: How Information is Represented in Signals The most important part of any DSP task is understanding how information is contained in the signals you are working with. There are many ways that information can be contained in a signal. This is especially true if the signal is manmade. For instance, consider all of the modulation schemes that have been devised: AM, FM, single-sideband, pulse-code modulation, pulse-width modulation, etc. The list goes on and on. Fortunately, there are only two ways that are common for information to be represented in naturally occurring signals. We will call these: information represented in the time domain, and information represented in the frequency domain. Information represented in the time domain describes when something occurs and what the amplitude of the occurrence is. For example, imagine an experiment to study the light output from the sun. The light output is measured and recorded once each second. Each sample in the signal indicates what is happening at that instant, and the level of the event. If a solar flare occurs, the signal directly provides information on the time it occurred, the duration, the development over time, etc. Each sample contains information that is interpretable without reference to any other sample. Even if you have only one sample from this signal, you still know something about what you are measuring. This is the simplest way for information to be contained in a signal. In contrast, information represented in the frequency domain is more indirect. Many things in our universe show periodic motion. For example, a wine glass struck with a fingernail will vibrate, producing a ringing sound; the pendulum of a grandfather clock swings back and forth; stars and planets rotate on their axis and revolve around each other, and so forth. By measuring the frequency, phase, and amplitude of this periodic motion, information can often be obtained about the system producing the motion. Suppose we sample the sound produced by the ringing wine glass. The fundamental frequency and harmonics of the periodic vibration relate to the mass and elasticity of the material. A single sample, in itself, contains no information about the periodic motion, and therefore no information about the wine glass. The information is contained in the relationship between many points in the signal. 266 The Scientist and Engineer's Guide to Digital Signal Processing This brings us to the importance of the step and frequency responses. The step response describes how information represented in the time domain is being modified by the system. In contrast, the frequency response shows how information represented in the frequency domain is being changed. This distinction is absolutely critical in filter design because it is not possible to optimize a filter for both applications. Good performance in the time domain results in poor performance in the frequency domain, and vice versa. If you are designing a filter to remove noise from an EKG signal (information represented in the time domain), the step response is the important parameter, and the frequency response is of little concern. If your task is to design a digital filter for a hearing aid (with the information in the frequency domain), the frequency response is all important, while the step response doesn't matter. Now let's look at what makes a filter optimal for time domain or frequency domain applications. Time Domain Parameters It may not be obvious why the step response is of such concern in time domain filters. You may be wondering why the impulse response isn't the important parameter. The answer lies in the way that the human mind understands and processes information. Remember that the step, impulse and frequency responses all contain identical information, just in different arrangements. The step response is useful in time domain analysis because it matches the way humans view the information contained in the signals. For example, suppose you are given a signal of some unknown origin and asked to analyze it. The first thing you will do is divide the signal into regions of similar characteristics. You can't stop from doing this; your mind will do it automatically. Some of the regions may be smooth; others may have large amplitude peaks; others may be noisy. This segmentation is accomplished by identifying the points that separate the regions. This is where the step function comes in. The step function is the purest way of representing a division between two dissimilar regions. It can mark when an event starts, or when an event ends. It tells you that whatever is on the left is somehow different from whatever is on the right. This is how the human mind views time domain information: a group of step functions dividing the information into regions of similar characteristics. The step response, in turn, is important because it describes how the dividing lines are being modified by the filter. The step response parameters that are important in filter design are shown in Fig. 14-2. To distinguish events in a signal, the duration of the step response must be shorter than the spacing of the events. This dictates that the step response should be as fast (the DSP jargon) as possible. This is shown in Figs. (a) & (b). The most common way to specify the risetime (more jargon) is to quote the number of samples between the 10% and 90% amplitude levels. Why isn't a very fast risetime always possible? There are many reasons, noise reduction, inherent limitations of the data acquisition system, avoiding aliasing, etc. Chapter 14- Introduction to Digital Filters 267 Sample number 0 16 32 48 64 -0.5 0.0 0.5 1.0 1.5 a. Slow step response Sample number 0 16 32 48 64 -0.5 0.0 0.5 1.0 1.5 b. Fast step response Sample number 0 16 32 48 64 -0.5 0.0 0.5 1.0 1.5 e. Nonlinear phase Sample number 0 16 32 48 64 -0.5 0.0 0.5 1.0 1.5 f. Linear phase FIGURE 14-2 Parameters for evaluating time domain performance. The step response is used to measure how well a filter performs in the time domain. Three parameters are important: (1) transition speed (risetime), shown in (a) and (b), (2) overshoot, shown in (c) and (d), and (3) phase linearity (symmetry between the top and bottom halves of the step), shown in (e) and (f). Sample number 0 16 32 48 64 -0.5 0.0 0.5 1.0 1.5 d. No overshoot Sample number 0 16 32 48 64 -0.5 0.0 0.5 1.0 1.5 c. Overshoot POOR GOOD Amplitude Amplitude Amplitude Amplitude Amplitude Amplitude Figures (c) and (d) shows the next parameter that is important: overshoot in the step response. Overshoot must generally be eliminated because it changes the amplitude of samples in the signal; this is a basic distortion of the information contained in the time domain. This can be summed up in 268 The Scientist and Engineer's Guide to Digital Signal Processing Frequency a. Low-pass Frequency c. Band-pass Frequency b. High-pass Frequency d. Band-reject passband stopband transition band FIGURE 14-3 The four common frequency responses. Frequency domain filters are generally used to pass certain frequencies (the passband), while blocking others (the stopband). Four responses are the most common: low-pass, high-pass, band-pass, and band-reject. Amplitude Amplitude Amplitude Amplitude one question: Is the overshoot you observe in a signal coming from the thing you are trying to measure, or from the filter you have used? Finally, it is often desired that the upper half of the step response be symmetrical with the lower half, as illustrated in (e) and (f). This symmetry is needed to make the rising edges look the same as the falling edges. This symmetry is called linear phase, because the frequency response has a phase that is a straight line (discussed in Chapter 19). Make sure you understand these three parameters; they are the key to evaluating time domain filters. Frequency Domain Parameters Figure 14-3 shows the four basic frequency responses. The purpose of these filters is to allow some frequencies to pass unaltered, while completely blocking other frequencies. The passband refers to those frequencies that are passed, while the stopband contains those frequencies that are blocked. The transition band is between. A fast roll-off means that the transition band is very narrow. The division between the passband and transition band is called the cutoff frequency. In analog filter design, the cutoff frequency is usually defined to be where the amplitude is reduced to 0.707 (i.e., -3dB). Digital filters are less standardized, and it is common to see 99%, 90%, 70.7%, and 50% amplitude levels defined to be the cutoff frequency. Figure 14-4 shows three parameters that measure how well a filter performs in the frequency domain. To separate closely spaced frequencies, the filter must have a fast roll-off, as illustrated in (a) and (b). For the passband frequencies to move through the filter unaltered, there must be no passband ripple, as shown in (c) and (d). Lastly, to adequately block the stopband frequencies, it is necessary to have good stopband attenuation, displayed in (e) and (f). Chapter 14- Introduction to Digital Filters 269 Frequency 0 0.1 0.2 0.3 0.4 0.5 -0.5 0.0 0.5 1.0 1.5 a. Slow roll-off Frequency 0 0.1 0.2 0.3 0.4 0.5 -0.5 0.0 0.5 1.0 1.5 b. Fast roll-off Frequency 0 0.1 0.2 0.3 0.4 0.5 -120 -100 -80 -60 -40 -20 0 20 40 e. Poor stopband attenuation Frequency 0 0.1 0.2 0.3 0.4 0.5 -120 -100 -80 -60 -40 -20 0 20 40 f. Good stopband attenuation FIGURE 14-4 Parameters for evaluating frequency domain performance. The frequency responses shown are for low-pass filters. Three parameters are important: (1) roll-off sharpness, shown in (a) and (b), (2) passband ripple, shown in (c) and (d), and (3) stopband attenuation, shown in (e) and (f). Frequency 0 0.1 0.2 0.3 0.4 0.5 -0.5 0.0 0.5 1.0 1.5 d. Flat passband Frequency 0 0.1 0.2 0.3 0.4 0.5 -0.5 0.0 0.5 1.0 1.5 c. Ripple in passband POOR GOOD Amplitude (dB) Amplitude (dB) Amplitude Amplitude Amplitude Amplitude Why is there nothing about the phase in these parameters? First, the phase isn't important in most frequency domain applications. For example, the phase of an audio signal is almost completely random, and contains little useful information. Second, if the phase is important, it is very easy to make digital 270 The Scientist and Engineer's Guide to Digital Signal Processing filters with a perfect phase response, i.e., all frequencies pass through the filter with a zero phase shift (also discussed in Chapter 19). In comparison, analog filters are ghastly in this respect. Previous chapters have described how the DFT converts a system's impulse response into its frequency response. Here is a brief review. The quickest way to calculate the DFT is by means of the FFT algorithm presented in Chapter 12. Starting with a filter kernel N samples long, the FFT calculates the frequency spectrum consisting of an N point real part and an N point imaginary part. Only samples 0 to N/2 of the FFT's real and imaginary parts contain useful information; the remaining points are duplicates (negative frequencies) and can be ignored. Since the real and imaginary parts are difficult for humans to understand, they are usually converted into polar notation as described in Chapter 8. This provides the magnitude and phase signals, each running from sample 0 to sample N/2 (i.e., N/2%1 samples in each signal). For example, an impulse response of 256 points will result in a frequency response running from point 0 to 128. Sample 0 represents DC, i.e., zero frequency. Sample 128 represents one-half of the sampling rate. Remember, no frequencies higher than one-half of the sampling rate can appear in sampled data. The number of samples used to represent the impulse response can be arbitrarily large. For instance, suppose you want to find the frequency response of a filter kernel that consists of 80 points. Since the FFT only works with signals that are a power of two, you need to add 48 zeros to the signal to bring it to a length of 128 samples. This padding with zeros does not change the impulse response. To understand why this is so, think about what happens to these added zeros when the input signal is convolved with the system's impulse response. The added zeros simply vanish in the convolution, and do not affect the outcome. Taking this a step further, you could add many zeros to the impulse response to make it, say, 256, 512, or 1024 points long. The important idea is that longer impulse responses result in a closer spacing of the data points in the frequency response. That is, there are more samples spread between DC and one-half of the sampling rate. Taking this to the extreme, if the impulse response is padded with an infinite number of zeros, the data points in the frequency response are infinitesimally close together, i.e., a continuous line. In other words, the frequency response of a filter is really a continuous signal between DC and one-half of the sampling rate. The output of the DFT is a sampling of this continuous line. What length of impulse response should you use when calculating a filter's frequency response? As a first thought, try N’1024 , but don't be afraid to change it if needed (such as insufficient resolution or excessive computation time). Keep in mind that the "good" and "bad" parameters discussed in this chapter are only generalizations. Many signals don't fall neatly into categories. For example, consider an EKG signal contaminated with 60 hertz interference. The information is encoded in the time domain, but the interference is best dealt with in the frequency domain. The best design for this application is Chapter 14- Introduction to Digital Filters 271 Sample number 0 10 20 30 40 50 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 a. Original filter kernel Frequency 0 0.1 0.2 0.3 0.4 0.5 0.0 0.5 1.0 1.5 b. Original frequency response FIGURE 14-5 Example of spectral inversion. The low-pass filter kernel in (a) has the frequency response shown in (b). A high-pass filter kernel, (c), is formed by changing the sign of each sample in (a), and adding one to the sample at the center of symmetry. This action in the time domain inverts the frequency spectrum (i.e., flips it top-forbottom), as shown by the high-pass frequency response in (d). Frequency 0 0.1 0.2 0.3 0.4 0.5 0.0 0.5 1.0 1.5 d. Inverted frequency response Flipped top-for-bottom Sample number 0 10 20 30 40 50 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 c. Filter kernel with spectral inversion Time Domain Frequency Domain Amplitude Amplitude Amplitude Amplitude bound to have trade-offs, and might go against the conventional wisdom of this chapter. Remember the number one rule of education: A paragraph in a book doesn't give you a license to stop thinking. High-Pass, Band-Pass and Band-Reject Filters High-pass, band-pass and band-reject filters are designed by starting with a low-pass filter, and then converting it into the desired response. For this reason, most discussions on filter design only give examples of low-pass filters. There are two methods for the low-pass to high-pass conversion: spectral inversion and spectral reversal. Both are equally useful. An example of spectral inversion is shown in 14-5. Figure (a) shows a lowpass filter kernel called a windowed-sinc (the topic of Chapter 16). This filter kernel is 51 points in length, although many of samples have a value so small that they appear to be zero in this graph. The corresponding 272 The Scientist and Engineer's Guide to Digital Signal Processing x[n] y[n] x[n] *[n] - h[n] y[n] h[n] *[n] Low-pass All-pass b. High-pass High-pass in a single stage a. High-pass by adding parallel stages FIGURE 14-6 Block diagram of spectral inversion. In (a), the input signal, x[n] , is applied to two systems in parallel, having impulse responses of h[n] and *[n] . As shown in (b), the combined system has an impulse response of *[n]& h[n] . This means that the frequency response of the combined system is the inversion of the frequency response of h[n] . frequency response is shown in (b), found by adding 13 zeros to the filter kernel and taking a 64 point FFT. Two things must be done to change the low-pass filter kernel into a high-pass filter kernel. First, change the sign of each sample in the filter kernel. Second, add one to the sample at the center of symmetry. This results in the high-pass filter kernel shown in (c), with the frequency response shown in (d). Spectral inversion flips the frequency response top-for-bottom, changing the passbands into stopbands, and the stopbands into passbands. In other words, it changes a filter from low-pass to high-pass, high-pass to low-pass, band-pass to band-reject, or band-reject to band-pass. Figure 14-6 shows why this two step modification to the time domain results in an inverted frequency spectrum. In (a), the input signal, x[n] , is applied to two systems in parallel. One of these systems is a low-pass filter, with an impulse response given by h[n] . The other system does nothing to the signal, and therefore has an impulse response that is a delta function, *[n] . The overall output, y[n] , is equal to the output of the all-pass system minus the output of the low-pass system. Since the low frequency components are subtracted from the original signal, only the high frequency components appear in the output. Thus, a high-pass filter is formed. This could be performed as a two step operation in a computer program: run the signal through a low-pass filter, and then subtract the filtered signal from the original. However, the entire operation can be performed in a signal stage by combining the two filter kernels. As described in Chapter Chapter 14- Introduction to Digital Filters 273 Sample number 0 10 20 30 40 50 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 a. Original filter kernel Frequency 0 0.1 0.2 0.3 0.4 0.5 0.0 0.5 1.0 1.5 b. Original frequency response FIGURE 14-7 Example of spectral reversal. The low-pass filter kernel in (a) has the frequency response shown in (b). A high-pass filter kernel, (c), is formed by changing the sign of every other sample in (a). This action in the time domain results in the frequency domain being flipped left-for-right, resulting in the high-pass frequency response shown in (d). Frequency 0 0.1 0.2 0.3 0.4 0.5 0.0 0.5 1.0 1.5 d. Reversed frequency response Flipped left-for-right Sample number 0 10 20 30 40 50 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 c. Filter kernel with spectral reversal Time Domain Frequency Domain Amplitude Amplitude Amplitude Amplitude 7, parallel systems with added outputs can be combined into a single stage by adding their impulse responses. As shown in (b), the filter kernel for the highpass filter is given by: *[n] & h[n]. That is, change the sign of all the samples, and then add one to the sample at the center of symmetry. For this technique to work, the low-frequency components exiting the low-pass filter must have the same phase as the low-frequency components exiting the all-pass system. Otherwise a complete subtraction cannot take place. This places two restrictions on the method: (1) the original filter kernel must have left-right symmetry (i.e., a zero or linear phase), and (2) the impulse must be added at the center of symmetry. The second method for low-pass to high-pass conversion, spectral reversal, is illustrated in Fig. 14-7. Just as before, the low-pass filter kernel in (a) corresponds to the frequency response in (b). The high-pass filter kernel, (c), is formed by changing the sign of every other sample in (a). As shown in (d), this flips the frequency domain left-for-right: 0 becomes 0.5 and 0.5 274 The Scientist and Engineer's Guide to Digital Signal Processing h1x[n] [n] h2[n] y[n] h1[n] h2x[n] [n] y[n] Band-pass a. Band-pass by Low-pass High-pass cascading stages b. Band-pass in a single stage FIGURE 14-8 Designing a band-pass filter. As shown in (a), a band-pass filter can be formed by cascading a low-pass filter and a high-pass filter. This can be reduced to a single stage, shown in (b). The filter kernel of the single stage is equal to the convolution of the low-pass and highpass filter kernels. becomes 0. The cutoff frequency of the example low-pass filter is 0.15, resulting in the cutoff frequency of the high-pass filter being 0.35. Changing the sign of every other sample is equivalent to multiplying the filter kernel by a sinusoid with a frequency of 0.5. As discussed in Chapter 10, this has the effect of shifting the frequency domain by 0.5. Look at (b) and imagine the negative frequencies between -0.5 and 0 that are of mirror image of the frequencies between 0 and 0.5. The frequencies that appear in (d) are the negative frequencies from (b) shifted by 0.5. Lastly, Figs. 14-8 and 14-9 show how low-pass and high-pass filter kernels can be combined to form band-pass and band-reject filters. In short, adding the filter kernels produces a band-reject filter, while convolving the filter kernels produces a band-pass filter. These are based on the way cascaded and parallel systems are be combined, as discussed in Chapter 7. Multiple combination of these techniques can also be used. For instance, a band-pass filter can be designed by adding the two filter kernels to form a stop-pass filter, and then use spectral inversion or spectral reversal as previously described. All these techniques work very well with few surprises. Filter Classification Table 14-1 summarizes how digital filters are classified by their use and by their implementation. The use of a digital filter can be broken into three categories: time domain, frequency domain and custom. As previously described, time domain filters are used when the information is encoded in the shape of the signal's waveform. Time domain filtering is used for such actions as: smoothing, DC removal, waveform shaping, etc. In contrast, frequency domain filters are used when the information is contained in the Chapter 14- Introduction to Digital Filters 275 x[n] y[n] x[n] h1[n] + h2[n] y[n] h1[n] h2[n] Low-pass High-pass b. Band-reject Band-reject in a single stage a. Band-reject by adding parallel stages FIGURE 14-9 Designing a band-reject filter. As shown in (a), a band-reject filter is formed by the parallel combination of a low-pass filter and a high-pass filter with their outputs added. Figure (b) shows this reduced to a single stage, with the filter kernel found by adding the low-pass and high-pass filter kernels. Recursion Time Domain Frequency Domain Finite Impulse Response (FIR) Infinite Impulse Response (IIR) Moving average (Ch. 15) Single pole (Ch. 19) Windowed-sinc (Ch. 16) Chebyshev (Ch. 20) Custom FIR custom (Ch. 17) Iterative design (Ch. 26) (Deconvolution) Convolution FILTER IMPLEMENTED BY: (smoothing, DC removal) (separating frequencies) FILTER USED FOR: TABLE 14-1 Filter classification. Filters can be divided by their use, and how they are implemented. amplitude, frequency, and phase of the component sinusoids. The goal of these filters is to separate one band of frequencies from another. Custom filters are used when a special action is required by the filter, something more elaborate than the four basic responses (high-pass, low-pass, band-pass and band-reject). For instance, Chapter 17 describes how custom filters can be used for deconvolution, a way of counteracting an unwanted convolution. 276 The Scientist and Engineer's Guide to Digital Signal Processing Digital filters can be implemented in two ways, by convolution (also called finite impulse response or FIR) and by recursion (also called infinite impulse response or IIR). Filters carried out by convolution can have far better performance than filters using recursion, but execute much more slowly. The next six chapters describe digital filters according to the classifications in Table 14-1. First, we will look at filters carried out by convolution. The moving average (Chapter 15) is used in the time domain, the windowed-sinc (Chapter 16) is used in the frequency domain, and FIR custom (Chapter 17) is used when something special is needed. To finish the discussion of FIR filters, Chapter 18 presents a technique called FFT convolution. This is an algorithm for increasing the speed of convolution, allowing FIR filters to execute faster. Next, we look at recursive filters. The single pole recursive filter (Chapter 19) is used in the time domain, while the Chebyshev (Chapter 20) is used in the frequency domain. Recursive filters having a custom response are designed by iterative techniques. For this reason, we will delay their discussion until Chapter 26, where they will be presented with another type of iterative procedure: the neural network. As shown in Table 14-1, convolution and recursion are rival techniques; you must use one or the other for a particular application. How do you choose? Chapter 21 presents a head-to-head comparison of the two, in both the time and frequency domains. The Complex Fourier Transform Although complex numbers are fundamentally disconnected from our reality, they can be used to solve science and engineering problems in two ways. First, the parameters from a real world problem can be substituted into a complex form, as presented in the last chapter. The second method is much more elegant and powerful, a way of making the complex numbers mathematically equivalent to the physical problem. This approach leads to the complex Fourier transform, a more sophisticated version of the real Fourier transform discussed in Chapter 8. The complex Fourier transform is important in itself, but also as a stepping stone to more powerful complex techniques, such as the Laplace and z-transforms. These complex transforms are the foundation of theoretical DSP. The Real DFT All four members of the Fourier transform family (DFT, DTFT, Fourier Transform & Fourier Series) can be carried out with either real numbers or complex numbers. Since DSP is mainly concerned with the DFT, we will use it as an example. Before jumping into the complex math, let's review the real DFT with a special emphasis on things that are awkward with the mathematics. In Chapter 8 we defined the real version of the Discrete Fourier Transform according to the equations: In words, an N sample time domain signal, x [n] , is decomposed into a set of N/2%1 cosine waves, and N/2%1 sine waves, with frequencies given by the 568 The Scientist and Engineer's Guide to Digital Signal Processing index, k. The amplitudes of the cosine waves are contained in ReX[k ], while the amplitudes of the sine waves are contained in Im X[k] . These equations operate by correlating the respective cosine or sine wave with the time domain signal. In spite of using the names: real part and imaginary part, there are no complex numbers in these equations. There isn't a j anywhere in sight! We have also included the normalization factor, 2/N in these equations. Remember, this can be placed in front of either the synthesis or analysis equation, or be handled as a separate step (as described by Eq. 8-3). These equations should be very familiar from previous chapters. If they aren't, go back and brush up on these concepts before continuing. If you don't understand the real DFT, you will never be able to understand the complex DFT. Even though the real DFT uses only real numbers, substitution allows the frequency domain to be represented using complex numbers. As suggested by the names of the arrays, ReX[k ] becomes the real part of the complex frequency spectrum, and Im X[k] becomes the imaginary part. In other words, we place a j with each value in the imaginary part, and add the result to the real part. However, do not make the mistake of thinking that this is the "complex DFT." This is nothing more than the real DFT with complex substitution. While the real DFT is adequate for many applications in science and engineering, it is mathematically awkward in three respects. First, it can only take advantage of complex numbers through the use of substitution. This makes mathematicians uncomfortable; they want to say: "this equals that," not simply: "this represents that." For instance, imagine we are given the mathematical statement: A equals B. We immediately know countless consequences: 5A’ 5B, 1%A ’ 1%B, A/ x ’ B/ x, etc. Now suppose we are given the statement: A represents B. Without additional information, we know absolutely nothing! When things are equal, we have access to four-thousand years of mathematics. When things only represent each other, we must start from scratch with new definitions. For example, when sinusoids are represented by complex numbers, we allow addition and subtraction, but prohibit multiplication and division. The second thing handled poorly by the real Fourier transform is the negative frequency portion of the spectrum. As you recall from Chapter 10, sine and cosine waves can be described as having a positive frequency or a negative frequency. Since the two views are identical, the real Fourier transform ignores the negative frequencies. However, there are applications where the negative frequencies are important. This occurs when negative frequency components are forced to move into the positive frequency portion of the spectrum. The ghosts take human form, so to speak. For instance, this is what happens in aliasing, circular convolution, and amplitude modulation. Since the real Fourier transform doesn't use negative frequencies, its ability to deal with these situations is very limited. Our third complaint is the special handing of ReX [0] and ReX [N/2], the first and last points in the frequency spectrum. Suppose we start with an N Chapter 31- The Complex Fourier Transform 569 EQUATION 31-2 Euler's relation. e jx ’ cos(x) % j sin (x) EQUATION 31-3 Euler's relation for sine & cosine. sin (x) ’ e jx & e &jx 2j cos (x) ’ e jx % e &jx 2 sin(Tt ) ’ 1 2 je j (&T)t & 1 2 je jTt EQUATION 31-4 Sinusoids as complex numbers. Using complex numbers, cosine and sine waves can be written as the sum of a positive and a negative frequency. cos(Tt ) ’ 1 2 e j (&T)t % 1 2 e jTt point signal, x [n]. Taking the DFT provides the frequency spectrum contained in ReX [k] and ImX [k] , where k runs from 0 to N/2. However, these are not the amplitudes needed to reconstruct the time domain waveform; samples ReX [0] and ReX [N/2] must first be divided by two. (See Eq. 8-3 to refresh your memory). This is easily carried out in computer programs, but inconvenient to deal with in equations. The complex Fourier transform is an elegant solution to these problems. It is natural for complex numbers and negative frequencies to go hand-in-hand. Let's see how it works. Mathematical Equivalence Our first step is to show how sine and cosine waves can be written in an equation with complex numbers. The key to this is Euler's relation, presented in the last chapter: At first glance, this doesn't appear to be much help; one complex expression is equal to another complex expression. Nevertheless, a little algebra can rearrange the relation into two other forms: This result is extremely important, we have developed a way of writing equations between complex numbers and ordinary sinusoids. Although Eq. 31- 3 is the standard form of the identity, it will be more useful for this discussion if we change a few terms around: Each expression is the sum of two exponentials: one containing a positive frequency (T), and the other containing a negative frequency (-T). In other words, when sine and cosine waves are written as complex numbers, the 570 The Scientist and Engineer's Guide to Digital Signal Processing EQUATION 31-5 The forward complex DFT. Both the time domain, x [n], and the frequency domain, X[k], are arrays of complex numbers, with k and n running from 0 to N-1. This equation is in polar form, the most common for DSP. X[k] ’ 1 N j N& 1 n’ 0 x [n] e &j 2B kn /N X[k] ’ 1 N j N& 1 n’ 0 x[n] cos (2Bkn/N) & j sin (2Bkn/N) EQUATION 31-6 The forward complex DFT (rectangular form). negative portion of the frequency spectrum is automatically included. The positive and negative frequencies are treated with an equal status; it requires one-half of each to form a complete waveform. The Complex DFT The forward complex DFT, written in polar form, is given by: Alternatively, Euler's relation can be used to rewrite the forward transform in rectangular form: To start, compare this equation of the complex Fourier transform with the equation of the real Fourier transform, Eq. 31-1. At first glance, they appear to be identical, with only small amount of algebra being required to turn Eq. 31-6 into Eq. 31-1. However, this is very misleading; the differences between these two equations are very subtle and easy to overlook, but tremendously important. Let's go through the differences in detail. First, the real Fourier transform converts a real time domain signal, x [n], into two real frequency domain signals, ReX[k ] & ImX[k ]. By using complex substitution, the frequency domain can be represented by a single complex array, X[k] . In the complex Fourier transform, both x [n] & X[k] are arrays of complex numbers. A practical note: Even though the time domain is complex, there is nothing that requires us to use the imaginary part. Suppose we want to process a real signal, such as a series of voltage measurements taken over time. This group of data becomes the real part of the time domain signal, while the imaginary part is composed of zeros. Second, the real Fourier transform only deals with positive frequencies. That is, the frequency domain index, k, only runs from 0 to N/2. In comparison, the complex Fourier transform includes both positive and negative frequencies. This means k runs from 0 to N-1. The frequencies between 0 and N/2 are positive, while the frequencies between N/2 and N-1 are negative. Remember, the frequency spectrum of a discrete signal is periodic, making the negative frequencies between N/2 and N-1 the same as Chapter 31- The Complex Fourier Transform 571 between -N/2 and 0. The samples at 0 and N/2 straddle the line between positive and negative. If you need to refresh your memory on this, look back at Chapters 10 and 12. Third, in the real Fourier transform with substitution, a j was added to the sine wave terms, allowing the frequency spectrum to be represented by complex numbers. To convert back to ordinary sine and cosine waves, we can simply drop the j. This is the sloppiness that comes when one thing only represents another thing. In comparison, the complex DFT, Eq. 31-5, is a formal mathematical equation with j being an integral part. In this view, we cannot arbitrary add or remove a j any more than we can add or remove any other variable in the equation. Forth, the real Fourier transform has a scaling factor of two in front, while the complex Fourier transform does not. Say we take the real DFT of a cosine wave with an amplitude of one. The spectral value corresponding to the cosine wave is also one. Now, let's repeat the process using the complex DFT. In this case, the cosine wave corresponds to two spectral values, a positive and a negative frequency. Both these frequencies have a value of ½. In other words, a positive frequency with an amplitude of ½, combines with a negative frequency with an amplitude of ½, producing a cosine wave with an amplitude of one. Fifth, the real Fourier transform requires special handling of two frequency domain samples: ReX [0] & ReX [N/2], but the complex Fourier transform does not. Suppose we start with a time domain signal, and take the DFT to find the frequency domain signal. To reverse the process, we take the Inverse DFT of the frequency domain signal, reconstructing the original time domain signal. However, there is scaling required to make the reconstructed signal be identical to the original signal. For the complex Fourier transform, a factor of 1/N must be introduced somewhere along the way. This can be tacked-on to the forward transform, the inverse transform, or kept as a separate step between the two. For the real Fourier transform, an additional factor of two is required (2/N), as described above. However, the real Fourier transform also requires an additional scaling step: ReX [0] and ReX [N/2] must be divided by two somewhere along the way. Put in other words, a scaling factor of 1/N is used with these two samples, while 2/N is used for the remainder of the spectrum. As previously stated, this awkward step is one of our complaints about the real Fourier transform. Why are the real and complex DFTs different in how these two points are handled? To answer this, remember that a cosine (or sine) wave in the time domain becomes split between a positive and a negative frequency in the complex DFT's spectrum. However, there are two exceptions to this, the spectral values at 0 and N/2. These correspond to zero frequency (DC) and the Nyquist frequency (one-half the sampling rate). Since these points straddle the positive and negative portions of the spectrum, they do not have a matching point. Because they are not combined with another value, they inherently have only one-half the contribution to the time domain as the other frequencies. 572 The Scientist and Engineer's Guide to Digital Signal Processing x[n] ’ j N& 1 k’ 0 X[k ]e j 2B kn /N EQUATION 31-7 The inverse complex DFT. This is matching equation to the forward complex DFT in Eq. 31-5. Im X[ ] Re X[ ] Frequency -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 -1.0 -0.5 0.0 0.5 1.0 Frequency -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 -1.0 -0.5 0.0 0.5 1.0 2 1 3 4 FIGURE 31-1 Complex frequency spectrum. These curves correspond to an entirely real time domain signal, because the real part of the spectrum has an even symmetry, and the imaginary part has an odd symmetry. The two square markers in the real part correspond to a cosine wave with an amplitude of one, and a frequency of 0.23. The two round markers in the imaginary part correspond to a sine wave with an amplitude of one, and a frequency of 0.23. Amplitude Amplitude Figure 31-1 illustrates the complex DFT's frequency spectrum. This figure assumes the time domain is entirely real, that is, its imaginary part is zero. We will discuss the idea of imaginary time domain signals shortly. There are two common ways of displaying a complex frequency spectrum. As shown here, zero frequency can be placed in the center, with positive frequencies to the right and negative frequencies to the left. This is the best way to think about the complete spectrum, and is the only way that an aperiodic spectrum can be displayed. The problem is that the spectrum of a discrete signal is periodic (such as with the DFT and the DTFT). This means that everything between -0.5 and 0.5 repeats itself an infinite number of times to the left and to the right. In this case, the spectrum between 0 and 1.0 contains the same information as from - 0.5 to 0.5. When graphs are made, such as Fig. 31-1, the -0.5 to 0.5 convention is usually used. However, many equations and programs use the 0 to 1.0 form. For instance, in Eqs. 31-5 and 31-6 the frequency index, k, runs from 0 to N-1 (coinciding with 0 to 1.0). However, we could write it to run from -N/2 to N/2-1 (coinciding with -0.5 to 0.5), if we desired. Using the spectrum in Fig. 31-1 as a guide, we can examine how the inverse complex DFT reconstructs the time domain signal. The inverse complex DFT, written in polar form, is given by: Chapter 31- The Complex Fourier Transform 573 x[n] ’ j N& 1 k’ 0 ReX[k] cos(2Bkn/N ) % j sin (2Bkn/N) EQUATION 31-8 The inverse complex DFT. This is Eq. 31-7 rewritten to show how each value in the frequency spectrum affects the time domain. & j N& 1 k’ 0 ImX[k] sin (2Bkn/N) & j cos (2Bkn/N) ½ cos(2B0.23n) % ½ j sin (2B0.23n) ½ cos(2B(&0.23) n) % ½ j sin (2B(&0.23)n) ½ cos(2B0.23n) & ½ j sin (2B0.23n) Using Euler's relation, this can be written in rectangular form as: The compact form of Eq. 31-7 is how the inverse DFT is usually written, although the expanded version in Eq. 31-9 can be easier to understand. In words, each value in the real part of the frequency domain contributes a real cosine wave and an imaginary sine wave to the time domain. Likewise, each value in the imaginary part of the frequency domain contributes a real sine wave and an imaginary cosine wave. The time domain is found by adding all these real and imaginary sinusoids. The important concept is that each value in the frequency domain produces both a real sinusoid and an imaginary sinusoid in the time domain. For example, imagine we want to reconstruct a unity amplitude cosine wave at a frequency of 2Bk/N . This requires a positive frequency and a negative frequency, both from the real part of the frequency spectrum. The two square markers in Fig. 31-1 are an example of this, with the frequency set at: k /N ’ 0.23 . The positive frequency at 0.23 (labeled 1 in Fig. 31-1) contributes a cosine wave and an imaginary sine wave to the time domain: Likewise, the negative frequency at -0.23 (labeled 2 in Fig. 31-1) also contributes a cosine and an imaginary sine wave to the time domain: The negative sign within the cosine and sine terms can be eliminated by the relations: cos(&x) ’ cos(x) and sin(&x) ’ &sin(x) . This allows the negative frequency's contribution to be rewritten: 574 The Scientist and Engineer's Guide to Digital Signal Processing ½ cos(2B0.23n) % ½ j sin (2B0.23n ) cos(2B0.23n) contribution from positive frequency ! contribution from negative frequency ! resultant time domain signal ! ½ cos(2B0.23n) & ½ j sin (2B0.23n ) contribution from positive frequency ! & ½ sin(2B0.23n) & ½ j cos (2B0.23n ) & sin (2B0.23n) contribution from negative frequency ! resultant time domain signal ! & ½ sin (2B0.23n) % ½ j cos(2B0.23n ) Adding the contributions from the positive and the negative frequencies reconstructs the time domain signal: In this same way, we can synthesize a sine wave in the time domain. In this case, we need a positive and negative frequency from the imaginary part of the frequency spectrum. This is shown by the round markers in Fig. 31-1. From Eq. 31-8, these spectral values contribute a sine wave and an imaginary cosine wave to the time domain. The imaginary cosine waves cancel, while the real sine waves add: Notice that a negative sine wave is generated, even though the positive frequency had a value that was positive. This sign inversion is an inherent part of the mathematics of the complex DFT. As you recall, this same sign inversion is commonly used in the real DFT. That is, a positive value in the imaginary part of the frequency spectrum corresponds to a negative sine wave. Most authors include this sign inversion in the definition of the real Fourier transform to make it consistent with its complex counterpart. The point is, this sign inversion must be used in the complex Fourier transform, but is merely an option in the real Fourier transform. The symmetry of the complex Fourier transform is very important. As illustrated in Fig. 31-1, a real time domain signal corresponds to a frequency spectrum with an even real part, and an odd imaginary part. In other words, the negative and positive frequencies have the same sign in the real part (such as points 1 and 2 in Fig. 31-1), but opposite signs in the imaginary part (points 3 and 4). This brings up another topic: the imaginary part of the time domain. Until now we have assumed that the time domain is completely real, that is, the imaginary part is zero. However, the complex Fourier transform does not require this. Chapter 31- The Complex Fourier Transform 575 What is the physical meaning of an imaginary time domain signal? Usually, there is none. This is just something allowed by the complex mathematics, without a correspondence to the world we live in. However, there are applications where it can be used or manipulated for a mathematical purpose. An example of this is presented in Chapter 12. The imaginary part of the time domain produces a frequency spectrum with an odd real part, and an even imaginary part. This is just the opposite of the spectrum produced by the real part of the time domain (Fig. 31-1). When the time domain contains both a real part and an imaginary part, the frequency spectrum is the sum of the two spectra, had they been calculated individually. Chapter 12 describes how this can be used to make the FFT algorithm calculate the frequency spectra of two real signals at once. One signal is placed in the real part of the time domain, while the other is place in the imaginary part. After the FFT calculation, the spectra of the two signals are separated by an even/odd decomposition. The Family of Fourier Transforms Just as the DFT has a real and complex version, so do the other members of the Fourier transform family. This produces the zoo of equations shown in Table 31-1. Rather than studying these equations individually, try to understand them as a well organized and symmetrical group. The following comments describe the organization of the Fourier transform family. It is detailed, repetitive, and boring. Nevertheless, this is the background needed to understand theoretical DSP. Study it well. 1. Four Fourier Transforms A time domain signal can be either continuous or discrete, and it can be either periodic or aperiodic. This defines four types of Fourier transforms: the Discrete Fourier Transform (discrete, periodic), the Discrete Time Fourier Transform (discrete, aperiodic), the Fourier Series (continuous, periodic), and the Fourier Transform (continuous, aperiodic). Don't try to understand the reasoning behind these names, there isn't any. If a signal is discrete in one domain, it will be periodic in the other. Likewise, if a signal is continuous in one domain, will be aperiodic in the other. Continuous signals are represented by parenthesis, ( ), while discrete signals are represented by brackets, [ ]. There is no notation to indicate if a signal is periodic or aperiodic. 2. Real versus Complex Each of these four transforms has a complex version and a real version. The complex versions have a complex time domain signal and a complex frequency domain signal. The real versions have a real time domain signal and two real frequency domain signals. Both positive and negative frequencies are used in the complex cases, while only positive frequencies are used for the real transforms. The complex transforms are usually written in an exponential 576 The Scientist and Engineer's Guide to Digital Signal Processing form; however, Euler's relation can be used to change them into a cosine and sine form if needed. 3. Analysis and Synthesis Each transform has an analysis equation (also called the forward transform) and a synthesis equation (also called the inverse transform). The analysis equations describe how to calculate each value in the frequency domain based on all of the values in the time domain. The synthesis equations describe how to calculate each value in the time domain based on all of the values in the frequency domain. 4. Time Domain Notation Continuous time domain signals are called x (t ), while discrete time domain signals are called x[n] . For the complex transforms, these signals are complex. For the real transforms, these signals are real. All of the time domain signals extend from minus infinity to positive infinity. However, if the time domain is periodic, we are only concerned with a single cycle, because the rest is redundant. The variables, T and N, denote the periods of continuous and discrete signals in the time domain, respectively. 5. Frequency Domain Notation Continuous frequency domain signals are called X(T) if dt hey are complex, an ReX(T) & ImX(T) if they ared real. Discrete frequency domain signals are calle X[k] if they are complex, and ReX [k ] & ImX [k ] if they are real. The complex transforms have negative frequencies that extend from minus infinity to zero, and positive frequencies that extend from zero to positive infinity. The real transforms only use positive frequencies. If the frequency domain is periodic, we are only concerned with a single cycle, because the rest is redundant. For continuous frequency domains, the independent variable, T, makes one complete period from -B to B. In the discrete case, we use the period where k runs from 0 to N-1 6. The Analysis Equations The analysis equations operate by correlation, i.e., multiplying the time domain signal by a sinusoid and integrating (continuous time domain) or summing (discrete time domain) over the appropriate time domain section. If the time domain signal is aperiodic, the appropriate section is from minus infinity to positive infinity. If the time domain signal is periodic, the appropriate section is over any one complete period. The equations shown here are written with the integration (or summation) over the period: 0 to T (or 0 to N-1). However, any other complete period would give identical results, i.e., -T to 0, -T/2 to T/2, etc. 7. The Synthesis Equations The synthesis equations describe how an individual value in the time domain is calculated from all the points in the frequency domain. This is done by multiplying the frequency domain by a sinusoid, and integrating (continuous frequency domain) or summing (discrete frequency domain) over the appropriate frequency domain section. If the frequency domain is complex and aperiodic, the appropriate section is negative infinity to positive infinity. If the Chapter 31- The Complex Fourier Transform 577 Using f instead of T by the relation: T’ 2Bf Integrating over other periods, such as: -T to 0, -T/2 to T/2, or 0 to T Moving all or part of the scaling factor to the synthesis equation Replacing the period with the fundamental frequency, f0 ’ 1/T Using other variable names, for example, T can become S in the DTFT, and Re X [k] & Im Xs [k] can become ak & bk in the Fourier Serie frequency domain is complex and periodic, the appropriate section is over one complete cycle, i.e., -B to B (continuous frequency domain), or 0 to N-1 (discrete frequency domain). If the frequency domain is real and aperiodic, the appropriate section is zero to positive infinity, that is, only the positive frequencies. Lastly, if the frequency domain is real and periodic, the appropriate section is over the one-half cycle containing the positive frequencies, either 0 to B (continuous frequency domain) or 0 to N/2 (discrete frequency domain). 8. Scaling To make the analysis and synthesis equations undo each other, a scaling factor must be placed on one or the other equation. In Table 31-1, we have placed the scaling factors with the analysis equations. In the complex case, these scaling factors are: 1/N, 1/T, or 1/2B. Since the real transforms do not use negative frequencies, the scaling factors are twice as large: 2/N, 2/T, or 1/B. The real transforms also include a negative sign in the calculation of the imaginary part of the frequency spectrum (an option used to make the real transforms more consistent with the complex transforms). Lastly, the synthesis equations for the real DFT and the real Fourier Series have special scaling instructions involving Re X(0 ) and Re X [N/2] . 9. Variations These equations may look different in other publications. Here are a few variations to watch out for: Why the Complex Fourier Transform is Used It is painfully obvious from this chapter that the complex DFT is much more complicated than the real DFT. Are the benefits of the complex DFT really worth the effort to learn the intricate mathematics? The answer to this question depends on who you are, and what you plan on using DSP for. A basic premise of this book is that most practical DSP techniques can be understood and used without resorting to complex transforms. If you are learning DSP to assist in your non-DSP research or engineering, the complex DFT is probably overkill. Nevertheless, complex mathematics is the primary language of those that specialize in DSP. If you do not understand this language, you cannot communicate with professionals in the field. This includes the ability to understand the DSP literature: books, papers, technical articles, etc. Why are complex techniques so popular with the professional DSP crowd? 578 The Scientist and Engineer's Guide to Digital Signal Processing Discrete Fourier Transform (DFT) x[n] ’ j N&1 k’ 0 X[k] e j 2Bk n/N x[n] ’ j N/2 k’ 0 ReX[k] cos(2Bkn/N ) X[k] ’ 1 N j N&1 n’ 0 x[n] e &j 2Bkn/N ImX[k] ’ &2 N j N&1 n’ 0 x[n] sin (2Bkn/N ) & ImX[k] sin (2Bkn/N ) ReX[k] ’ 2 N j N&1 n’ 0 x[n] cos(2Bkn/N ) complex transform real transform synthesis analysis synthesis analysis Time domain: x[n] is complex, discrete and periodic n runs over one period, from 0 to N-1 Frequency domain: X[k] is complex, discrete and periodic k runs over one period, from 0 to N-1 k = 0 to N/2 are positive frequencies k = N/2 to N-1 are negative frequencies Time domain: x[n] is real, discrete and periodic n runs over one period, from 0 to N-1 Frequency domain: Re X[k] is real, discrete and periodic Im X[k] is real, discrete and periodic k runs over one-half period, from 0 to N/2 Note: Before using the synthesis equation, the values for Re X[0] and Re X[N/2] must be divided by two. Discrete Time Fourier Transform (DTFT) x[n] ’ m 2B 0 X(T) e jTn dT x[n] ’ m B 0 ReX(T) cos(Tn) X(T) ’ 1 2B j%4 n ’&4 x[n] e &jTn ImX(T) ’ &1 B j%4 n’&4 x[n] sin (Tn) & ImX (T) sin(Tn)dT ReX(T) ’ 1 B j%4 n’&4 x[n]cos(Tn) complex transform real transform synthesis analysis synthesis analysis Time domain: x[n] is complex, discrete and aperiodic n runs from negative to positive infinity Frequency domain: X(T) is complex, continuous, and periodic T runs over a single period, from 0 to 2B T = 0 to B are positive frequencies T = B to 2B are negative frequencies Time domain: x[n] is real, discrete and aperiodic n runs from negative to positive infinity Frequency domain: Re X(T) is real, continuous and periodic Im X(T) is real, continuous and periodic T runs over one-half period, from 0 to B TABLE 31-1 The Fourier Transforms Chapter 31- The Complex Fourier Transform 579 Fourier Series x(t ) ’ j%4 k’ &4 X[k] e j 2Bkt /T x(t ) ’ j%4 k’ 0 ReX[k] cos(2Bkt /T ) X[k] ’ 1 T mT 0 x(t ) e &j 2Bkt /T dt & ImX[k] sin (2Bkt /T ) ReX[k] ’ 2 T mT 0 x(t ) cos(2Bkt /T ) dt complex transform real transform synthesis analysis synthesis analysis Time domain: x(t) is complex, continuous and periodic t runs over one period, from 0 to T Frequency domain: X[k] is complex, discrete, and aperiodic k runs from negative to positive infinity k > 0 are positive frequencies k < 0 are negative frequencies Time domain: x(t) is real, continuous, and periodic t runs over one period, from 0 to T Frequency domain: Re X[k] is real, discrete and aperiodic Im X[k] is real, discrete and aperiodic k runs from zero to positive infinity Note: Before using the synthesis equation, the value for Re X[0] must be divided by two. ImX[k] ’ &2 T mT 0 x(t ) sin (2Bkt /T ) dt Fourier Transform x(t ) ’ m %4 &4 X(T) e jTt dT x(t ) ’ m %4 0 ReX(T) cos(Tt) X(T) ’ 1 2B m %4 &4 x(t ) e &jTt dt & ImX(T) sin (Tt) dt ReX(T) ’ 1 B m %4 &4 x(t ) cos(Tt) dt complex transform real transform synthesis analysis synthesis analysis Time domain: x(t) is complex, continious and aperiodic t runs from negative to positive infinity Frequency domain: X(T) is complex, continious, and aperiodic T runs from negative to positive infinity T > 0 are positive frequencies T < 0 are negative frequencies Time domain: x(t) is real, continuous, and aperiodic t runs from negative to positive infinity Frequency domain: Re X[T] is real, continuous and aperiodic Im X[T] is real, continuous and aperiodic T runs from zero to positive infinity TABLE 31-1 The Fourier Transforms ImX(T) ’ &1 B m %4 &4 x(t ) sin (Tt) dt 580 The Scientist and Engineer's Guide to Digital Signal Processing There are several reasons we have already mentioned: compact equations, symmetry between the analysis and synthesis equations, symmetry between the time and frequency domains, inclusion of negative frequencies, a stepping stone to the Laplace and z-transforms, etc. There is also a more philosophical reason we have not discussed, something called truth. We started this chapter by listing several ways that the real Fourier transform is awkward. When the complex Fourier transform was introduced, the problems vanished. Wonderful, we said, the complex Fourier transform has solved the difficulties. While this is true, it does not give the complex Fourier transform its proper due. Look at this situation this way. In spite of its abstract nature, the complex Fourier transform properly describes how physical systems behave. When we restrict the mathematics to be real numbers, problems arise. In other words, these problems are not solved by the complex Fourier transform, they are introduced by the real Fourier transform. In the world of mathematics, the complex Fourier transform is a greater truth than the real Fourier transform. This holds great appeal to mathematicians and academicians, a group that strives to expand human knowledge, rather than simply solving a particular problem at hand. a Basic Mathematical Subroutines for the ADMC300 AN300-09 © Analog Devices Inc., January 2000 Page 1 of 16 a Basic Mathematical Subroutines for the ADMC300 AN300-09 a Basic Mathematical Subroutines for the ADMC300 AN300-09 © Analog Devices Inc., January 2000 Page 2 of 16 Table of Contents SUMMARY...................................................................................................................... 3 1 THE MATHEMATICAL LIBRARY ROUTINES ........................................................ 3 1.1 Using the Mathematical Routines .................................................................................................................3 1.2 Formats of inputs and outputs and usage of DSP core registers ................................................................4 1.3 Square Root.....................................................................................................................................................4 1.4 Logarithm........................................................................................................................................................6 1.4.1 Common Logarithm (Base 10) ................................................................................................................6 1.4.2 Natural Logarithm....................................................................................................................................6 1.5 Reciprocal........................................................................................................................................................8 2.2 Division........................................................................................................................................................8 1.6 Access to the library: the header file.............................................................................................................9 2 SOFTWARE EXAMPLE: TESTING THE MATHEMATICAL FUNCTIONS ........... 10 2.1 The main program: main.dsp......................................................................................................................10 2.2 The main include file: main.h ......................................................................................................................12 2.3 Example outputs ...........................................................................................................................................13 2.3.1 Square Root ...........................................................................................................................................13 2.3.2 Logarithm ..............................................................................................................................................14 2.3.3 Division..................................................................................................................................................15 2.3.4 Reciprocal ..............................................................................................................................................15 3 DIFFERENCES BETWEEN LIBRARY AND ADMC300 “ROM-UTILITIES” ......... 16 a Basic Mathematical Subroutines for the ADMC300 AN300-09 © Analog Devices Inc., January 2000 Page 3 of 16 Summary This application note illustrates the usage of some basic trigonometric subroutines such as sine and cosine. They are implemented in a library-like module for easy access. The realisation follows the one described in chapter 4 of the DSP applications handbook1. Then, a software example will be described that may be downloaded from the accompanying zipped files. Finally, some data will be shown concerning the accuracy of the algorithms. 1 The Mathematical Library Routines 1.1 Using the Mathematical Routines The routines are developed as an easy-to-use library, which has to be linked to the user’s application. The library consists of two files. The file “mathfun.dsp” contains the assembly code for the subroutines. This package has to be compiled and can then be linked to an application. The user simply has to include the header file “mathfun.h”, which provides function-like calls to the routines. The following table summarises the set of macros that are defined in this library. Note that every function stores the result in the sr1 register, except for the division routine which makes the results available in ar. Operation Usage Operands Initialisation Set_DAG_registers_for_math_function; none Square Root Square_Root (integer_part, fractional_part); integer_part = dreg2 or constant fractional_part = dreg3 or constant Logarithm Base 10 Log10(integer_part, fractional_part); integer_part = dreg2 or constant fractional_part = dreg3 or constant Natural Logarithm LogN(integer_part, fractional_part); integer_part = dreg2 or constant fractional_part = dreg3 or constant Reciprocal Inverse(integer_part, fractional_part); integer_part = dreg2 or constant fractional_part = dreg3 or constant Signed Division Signed_Division(integer_part, fractional_part); integer_part = dreg2 or constant fractional_part = dreg3 or constant Table 1: Implemented routines The routines do not require any configuration constants from the main include-file “main.h” that comes with every application note. For more information about the general structure of the application notes and including libraries into user applications refer to the Library Documentation File. Section 2 shows an example of usage of this library. In the following sections each routine is explained in detail with the relevant segments of code which is found in either “mathfun.h” or “mathfun.dsp”. For more information see the comments in those files. 1 a ”Digital Signal Applications using the ADSP-2100 Family”, Volume 1, Prentice Hall, 1992 2 Any data register of the ADSP-2171 core except mr0 3 Any data register of the ADSP-2171 core except mr1 a Basic Mathematical Subroutines for the ADMC300 AN300-09 © Analog Devices Inc., January 2000 Page 4 of 16 1.2 Formats of inputs and outputs and usage of DSP core registers The implementation of the macros listed in the previous section is based on the subroutines of Table 2. Note that the first four accept input in the unsigned 16.16 format and that the output is in various single precision format. The division routine expects a signed double precision value (for instance 1.31 or 8.24 …). Its output is in the ar register in a format that is determined by the input. It may also be noted that the DAG registers M5 and L5 must be set to 1 and 0 respectively and that they are not modified by the mathematical routines. The already mentioned call to Set_DAG_registers_for_math_function prepares these registers for the functions. It now becomes clear that this routine is necessary only once if M5 and/or L5 are not modified in another part of the user’s code, as shown in the example in section 2. Refer to the above-mentioned DSP applications handbook for more details on the routines described in the previous sections. Subroutine Input Output Modified Registers Other registers (Must be set) sqrt_(x) MR1, MR0 unsigned 16.16 Format 0 ≤ X <65536 SR1 in unsigned 8.8 format AX0,AX1,AY0,AY1,AF,AR, MY0, MY1,MX0,MF, MR, SE, SR, I5 M5=1 L5=0 Log10_(x) MR1, MR0 unsigned 16.16 format 0 ≤ X <65536 SR1 in signed 4.12 format AX0, AX1,AY0,AR, MY1, MX0, MX1, MF, MR, SE, SR, I5 M5=1 L5=0 Ln_(x) MR1, MR0 unsigned 16.16 format 0 ≤ X <65536 SR1 in signed 5.11 format AX0, AX1,AY0,AR, MY1, MX0, MX1, MF, MR, SE, SR, I5 M5=1 L5=0 inv_(x) MR1, MR0 16.16 Format 1 ≤ x <32768 SR1 in signed 1.15 format AX0,AY1, AY0, MR1, MR0, SR1, SR0 --- div_(x) Dividend NL.NR format Divisor DL.DR format AR in signed (NL –DL+1).(NR-DR- 1) format AX0, AX1, AR, AF, AY0, AY1 --- Table 2: Input and output format, modified registers for the mathematical routines 1.3 Square Root The following equation approximates the square root of the input value x, where 0.5 ≤ x ≤1: 0.0560605 0.1037903 0.5* ( ) 0.7274475 0.672455 0.553406 0.2682495 5 2 3 4 + + = − + − + x sqrt x x x x x ( 1) Text Box 1.2 shows the part of subroutine for getting square root when the original input falls into the equation valid range between 0.5 and 1.0. In the square root subroutine, the input is in 16.16 format, with unsigned integer in MR1 register and full fraction in MR0 register. Therefore, the valid input range for the square root subroutine is between 0 and 65536 (0xFFFF.FFFF). If the input value is out of the range between 0.5 and 1.0, the square root subroutine will scale the input in MR1 and MR0 registers by shift operation so that the scaled value will a Basic Mathematical Subroutines for the ADMC300 AN300-09 © Analog Devices Inc., January 2000 Page 5 of 16 fall into the valid equation range as input to equation ( 1) for computation. Obviously, the square root of the scaled input obtained from equation ( 1) must be multiplied by the square root of the scaling value to produce the square root of the original input as implemented in the following segment. .VAR/PM/RAM/SEG=USER_PM1 sqrt_coeff[5]; .INIT sqrt_coeff : 0x5D1D00, 0xA9ED00, 0x46D600, 0xDDAA00, 0x072D00; sqrt_: AX1=MR1; { store for knowing MSB } AR = PASS MR1; IF GE JUMP calculation; {MSB = 1 ?} SR = LSHIFT MR1 BY -1 (HI); { left shift by 1 } SR = SR OR LSHIFT MR0 BY -1 (LO); MR1 = SR1; MR0 = SR0; calculation: I5 = ^sqrt_coeff; {pointer to coeff. buffer} SE=EXP MR1 (HI); {Check for redundant bits} SE=EXP MR0 (LO); AX0=SE, SR=Norm MR1 (HI); SR=SR OR NORM MR0 (LO); MY0=SR1, AR=PASS SR1; IF EQ RTS; MR=0; MR1=base; {Load constant value} MF=AR*MY0 (RND), MX0=PM(I5,M5); {MF =x*x} MR=MR+MX0*MY0 (SS), MX0=PM(I5,M5); {MR = base + C1*x} CNTR=4; DO approx UNTIL CE; MR=MR+MX0*MF (SS), MX0=PM(I5,M5); approx: MF=AR*MF (RND); AY0=15; MY0=MR1, AR=AX0+AY0; {SE + 15 = 0?} IF NE JUMP scale; {No, compute scaling value} SR=ASHIFT MR1 BY -6 (HI); Jump modification; The next segment shows that the scaling value (1 2) 15 = ÷ + SE s is calculated where SE is the exponent detector value of the original input. If (SE+15) is negative, it means that original input is less than 0.5 and the approximated result of the scaled input is to be multiplied by the scaling number of 15 (1 2) ÷ + SE . Otherwise, the original value is larger than 1.0 and the approximated square root of the scaled input is multiplied with the reciprocal of the scaling number in order to get the result of the original input. It should be realised that equation ( 1) is for calculation of 0.5*Square_Root(x) and it is one of the factors under consideration when the subroutine Square_Root(x) shifts the result to get 8.8 format for the output of the original input. scale: MR=0; MR1=sqrt2a; {Load 1/sqrt2(2)} MY1=MR1, AR=ABS AR; AY0=AR; AR=AY0-1; IF EQ JUMP pwr_ok; CNTR=AR; {Compute S=(1/sqrt2(2))^(ABS(SE+15)) } DO compute UNTIL CE; compute: MR=MR1*MY1 (RND); pwr_ok: IF NEG JUMP frac; {If (SE+15) is negative, ...} AY1=0x0080; {Load a 1 in 9.23 format} AY0=0; {calculate 1/S, if (SE+15) positive } DIVS AY1, MR1; DIVQ MR1; DIVQ MR1; DIVQ MR1; DIVQ MR1; DIVQ MR1; DIVQ MR1; DIVQ MR1; DIVQ MR1; DIVQ MR1; DIVQ MR1; DIVQ MR1; DIVQ MR1; DIVQ MR1; DIVQ MR1; DIVQ MR1; MX0=AY0; MR=0; MR0=0x2000; MR=MR+MX0*MY0 (US); { 9.23 format in result } a Basic Mathematical Subroutines for the ADMC300 AN300-09 © Analog Devices Inc., January 2000 Page 6 of 16 SR=ASHIFT MR1 BY 2 (HI); { to compensate the coefficient scaling } SR=SR OR LSHIFT MR0 BY 2 (LO); { and get 8.8 format } Jump modification; frac: MR=MR1*MY0 (RND); SR=ASHIFT MR1 BY -6 (HI); { compensate coefficient scaling } { and get 8.8 format} modification: AR = PASS AX1; IF GE RTS; { MSB = 1? } MY1 = sqrt_2; { if yes, the original left shifted 1 bit } MR = SR1 * MY1(uu); { multiplied by sqrt2(2) to get final result } SR1 = MR1; RTS; 1.4 Logarithm 1.4.1 Common Logarithm (Base 10) The following equation approximates the common logarithm of the input value 1