Rahul Prakash, Eugenio Mejia TI Designs – Precision: Verified Design Digitally Tunable MDAC-Based State Variable Filter Reference Design TI Designs – Precision Circuit Description TI Designs – Precision are analog solutions created by TI’s analog experts. Verified Designs offer the theory, component selection, simulation, complete PCB schematic & layout, bill of materials, and measured performance of useful circuits. Circuit modifications that help to meet alternate design goals are also discussed. This MDAC based state variable filter offers highly accurate digital tuning of gain, center/cut off frequency, and quality factor. This circuit provides three separate filter outputs: low pass, band pass, and high pass that can be accessed simultaneously. Design Resources Design Archive TINA-TI™ DAC8812 OPA277 Ask The Analog Experts WEBENCH® Design Center TI Designs – Precision Library All Design files SPICE Simulator Product Folder Product Folder RFB IOUT MDAC VREF C1 RFB IN VREF MDAC C2 RFB RFB IOUT A1 A2 Gain Control – U4A VREF RFB VREF MDAC IOUT MDAC VREF A3 IOUT MDAC A4 LP Frequency Control – U1A/B IOUT HP RFB IOUT VREF MDAC BP Q-Factor Control – U4B An IMPORTANT NOTICE at the end of this TI reference design addresses authorized use, intellectual property matters and other important disclaimers and information. TINA-TI is a trademark of Texas Instruments WEBENCH is a registered trademark of Texas Instruments TIDU543-October 2014 Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated 1 www.ti.com 1 Design Summary The design requirements are as follows: Supply Voltage: 5 V AC Input: 1 VPP Output: Low pass, Band pass, High pass Tunability: Gain, Center/Cut off Frequency, and Quality Factor The design goals and performance are summarized in Table 1. Figure 1 depicts the measured transfer function of the design. Table 1. Comparison of Design Goals, Simulation, and Measured Performance Cut Off Frequency Range (3dB) Gain Range Quality Factor Range Goal Simulated Measured 10 Hz to 30kHz 2.11 Hz to 27.98 kHz 1.99 Hz to 28.76 kHz DAC Code Range: 0x0004 to 0xFFFF 0 dB to 6dB -54.13 dB to 6.02 dB -53.31 dB to 6.01 dB DAC Code Range: 0x0040 to 0xFFFF 0 dB to 6dB 0.47 to 2.15 0.46 to 2.14 DAC Code Range: 0xFFFF to 0x4000 Figure 1: Measured Transfer Function 2 Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated TIDU543-October 2014 www.ti.com 2 Theory of Operation An implementation of a state variable filter using discrete resistors is shown in Figure 2 R7 R5 IN R1 R8 C1 R6 R3 C2 R4 LP A1 A2 A3 HP A4 R2 BP Figure 2: State Variable Filter In Figure 2, amplifier A1 and A2 form summing and inverting stages followed by two op amp integrators, A3 and A4 which act as single pole low pass filters. Amplifiers A3 and A4 are cascaded to form a secondorder filter. This configuration provides 3 filter outputs: low pass (LP), band pass (BP) and high pass (HP). The center frequency (in the case of the band pass) or cut off frequency (in the case of the high pass and low pass) is set by theRC circuits on both integrators. For simplicity, this RC combination is typically made equal i.e. R3 = R4 and C1 = C2. In order to analyze this circuit, nodal equations for each node in the circuit must be solved. The resulting transfer function is shown in Equations 1, 2 & 3. R5 R8 C1 C2 R1 R3 R4 R6 LP R5 R8 R8 IN s 2 s C1 R2 R3 R6 C1 C2 R3 R4 R7 (1) R5 R8 s C1 R1 R3 R6 BP R5 R8 R8 IN s 2 s C1 R2 R3 R6 C1 C2 R3 R4 R7 (2) R5 R8 s2 C1 R1 R3 R6 HP R5 R8 R8 IN s 2 s C1 R2 R3 R6 C1 C2 R3 R4 R7 (3) C1 C2 , R3 R4 , R7 R8 (4) TIDU543-October 2014 Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated 3 www.ti.com Equations 1, 2 & 3 are simplified by making the assumptions in Equation 4. Comparing the resulting equations with the standard equation for a band pass filter (Equation 5), yields expressions for gain (A0), center/cut off frequency (ω), and quality factor (Q) (Equations 6, 7 & 8). A0 s Q BP IN s 2 s 2 Q R2 R1 (6) 1 C1 R3 (7) Q R2 R6 R5 R8 (8) A0 3 Component Selection 3.1 DAC Selection (5) To realize eight discrete resistors a minimum of six MDACs ladders must be used. By using three dual channel MDACs with only six MDAC ladders, resistors R5 and R7 are realized by using the fixed values of two MDAC feedback resistors. The DAC8812 is a great option for this design. It is a dual channel MDAC with strong linearity and large multiplying bandwidth which makes it ideal for this application. Generally, MDACs are used in high performance applications that take full advantage of their strong dc specifications. MDACs have a current output and are used in conjunction with an external I-V operational amplifier. However, this design leverages the unique software-controlled output impedance property of MDACs. An important property of MDACs for this application is their reference multiplying bandwidth. The reference multiplying bandwidth changes with the programed DAC code and the bandwidth is decreased at lower codes when the reference input is highly attenuated as shown in Figure 3. Plots such as these can be found in the datasheet of any MDAC. Figure 3: DAC8812 Reference multiplying bandwidth 4 Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated TIDU543-October 2014 www.ti.com MDAC RFB RFB RDAC VREF IOUT Figure 4: MDAC equivalent circuit The resistors in Figure 2 are replaced by MDACs. The circuit equivalents of an MDAC are shown in Figure 4. Resistor R5 and R7 are realized using feedback resistors integrated in the multiplying DACs. The values of these resistors are fixed and cannot be changed by writing to the MDAC. The remaining resistors are realized by the programmable ladder impedance of the MDAC. Table 2 shows the maximum and minimum values for the tunable resistors. Note that resistors R3/R4 and resistors R7/R8 are implemented such that their values are tuned simultaneously (refer to Equation 4). To realize all the resistors in this filter a minimum of six MDACs are required. Therefore three DAC8812, a 16-Bit, dual channel serial input multiplying DAC, are used in this design. The tunable resistor range for the DAC8812 is shown in Table 2. Keep in mind that the resistor ladders in the DAC8812 can vary by ±20 percent. Table 2. Measured resistor values tunable range with MDAC DAC8812 3.2 Resistors MDAC Minimum Value (0xFFFF Code) Maximum Value (0x0001 Code) R1 U4 A 5.02 kΩ 33.00 kΩ R2 U4 B 5.02 kΩ 25.57 kΩ R3 U2 A 5.00 kΩ 26.91 kΩ R4 U2 B 5.00 kΩ 22.86 kΩ R5 U4 B RFB 5.18 kΩ 5.18 kΩ R6 U1 B RFB 4.96 kΩ 4.96 kΩ R7 U1 B 4.81 kΩ 22.55 kΩ R8 U1 A 4.81 kΩ 22.48 kΩ Amplifier Selection This design requires four operational amplifiers. For all of these amplifiers, low input bias current is desired so that the critical parameters of the filter have exclusive tunability via the MDAC based resistors and their matching. The center/cut off frequency range for this design ranges from dc to 30 kHz, therefore high speed/high unity gain bandwidth amplifiers are not required. The OPA277 was selected for this design because it features a sufficiently low input bias current of 1 nA. 3.3 Passive Component Selection The high side cut off frequency is determined by the combination of capacitors C1 & C2 and the multiplying bandwidth of the MDAC with the lowest input code. The size of C1 is determined by Equation 7. The desired frequency bandwidth of the filters is 30 kHz. The DAC8812 reference input impedance is 5 kΩ paired with a 1 nF standard value for C1 will result in 32 kHz. In order to comply with Equation 4, both C1 and C2 must be the same value for the equations to be valid. TIDU543-October 2014 Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated 5 www.ti.com 4 Simulation The proposed circuit was simulated in TINA-TI™ using SPICE models of both the DAC8822 and OPA277. The choice of using the DAC8822 as a simulation model was based on the core similarity with the DAC8812 and the current lack of availability of a DAC8812 model. The DAC8822 and DAC8812 are very similar devices with the minor functional difference that the DAC8822 has more feedback resistor options. The simulation suite consists of an ac simulation test bench that included center/cut off frequency, gain and quality factor for high pass, low pass and band pass outputs. Figure 5 shows the realization of the resistors in this circuit using MDAC DAC8822. Figure 5: State Variable Filter using DAC8822 4.1 Center/Cut Off Frequency Simulation The center/cut off frequency simulations were carried out for all the outputs (low pass, band pass and high pass). The MDAC ladders U2A/B can be tuned, thereby changing the frequency from 2.11 Hz (code 0x0004) to 27.98 kHz (code 0xFFFF). See Equation (7). Note that 0x0000 is not used in this design because at this code all the ladder switches are open and the ladder resistance is Hi-Z. Figure 6 shows center frequency simulations for the high pass output. For frequency simulation data for band pass and low pass filters refer to Appendix B. Figure 6: Cut off frequency simulation – High pass output 6 Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated TIDU543-October 2014 www.ti.com 4.2 Gain Simulation The gain simulations were carried out for all the outputs (low pass, band pass and high pass). The MDAC ladder U4A can be tuned, thereby changing the gain from -54.13 dB (code 0x0040) to 6.02 dB (code 0xFFFF). See Equation 6. Figure 7 shows gain simulations for the low pass output. For gain simulation data for band pass and high pass filters refer to Appendix B. Figure 7: Gain simulation – Low pass output 4.3 Quality Factor Simulation The quality factor simulations were carried out for all the outputs (low pass, band pass and high pass). The MDAC ladder U4B can be tuned, thereby changing the quality factor from 0.47 (code 0xFFFF) to 2.15 (code 0x4000). See Equation (8). Figure 8 shows gain simulations for the band pass output. Figure 8: Quality Factor simulation – Band pass output TIDU543-October 2014 Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated 7 www.ti.com 5 PCB Design The PCB schematic and bill of materials can be found in the Appendix A. 5.1 PCB Layout General PCB layout best-practices should be followed for this design. Analog and digital lines must not be traced out parallel to each other in order to reduce the coupling of digital signals onto analog signal paths. Figure 9: PCB Layout 8 Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated TIDU543-October 2014 www.ti.com 6 Measurement The circuit was tested using a bode plot analyzer that provided the input stimulus and measured the output response. 6.1 Center/Cut-off Frequency Measurement The cut-off frequency setting is directly proportional to the DAC code of U2A/B. Each LSB change will adjust the frequency by approximately 0.5 Hz. For frequency measurement data for band pass and low pass filters refer to Appendix B. Figure 10: Cut-off frequency measurement – High pass output Table 3. High Pass Frequency Results @ 2 kHz Code 0x0004 0x8000 0xFFFF TIDU543-October 2014 Simulated Freq. 2.1100 Hz 14690 Hz 27980 Hz Measured Freq. 1.9900 Hz 14962 Hz 28757 Hz Error -5.69 % -1.85 % -2.78 % Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated 9 www.ti.com 6.2 Gain Measurement The gain setting is directly proportional to the DAC code of U4A. Each LSB change will adjust the gain by approximately 1 mdB. Measurements at very low codes are susceptible to noise. For gain measurement data for band pass and high pass filters refer to Appendix B. Figure 11: Gain measurement – Low pass output Table 4. Low Pass Gain Results Code 0x0040 0x8000 0xFFFF 10 Simulated Gain -54.1276 dB 0.0012 dB 6.0200 dB Measured Gain -53.3100 dB 0.0007 dB 6.0140 dB Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated Error -0.8176 dB 0.0004 dB 0.0060 dB TIDU543-October 2014 www.ti.com 6.3 Quality Factor Measurement The quality factor measurement is inversely proportional to the DAC code of U4B. Each LSB change will adjust the quality factor by approximately 52µ. The quality factor can be controlled independently of gain by using another MDAC to control resistors R5 & R6. For information about how to calculate quality factor, please refer to Appendix B. Figure 12: Quality factor measurement – Band pass output Table 5. Band Pass Quality Factor Results Code 0x4000 0x8000 0xFFFF TIDU543-October 2014 Simulated Q-Factor 2.1524 0.9461 0.4691 Measured Q-Factor Error 2.1424 -0.46 % 1.0077 6.52 % 0.4660 -0.65 % Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated 11 www.ti.com 7 Modifications Depending on the design requirement other multiplying DACs can be used in this design. DAC8812 was selected for its serial interface, high resolution, and superior multiplying bandwidth. Table 6 shows other MDAC options for application that may not require high resolution or that may require a parallel interface. Table 7 shows alternative amplifiers that can be used in this design for larger bandwidth or minimal input bias current. Table 6. Alternative MDACs MDAC Resolution Channel Count Interface Reference multiplying bandwidth DAC8812 16 bits 2 Serial 10 MHz DAC8822 16 bits 2 Parallel 10 MHz DAC8802 14 bits 2 Serial 10 MHz DAC8805 14 bits 2 Parallel 10 MHz DAC7822 12 bits 2 Parallel 10 MHz Table 7. Alternative operational amplifiers 8 Amplifier Supply Bandwidth Input bias current (Typ.) OPA277 ±18 V 1 MHz ±500 nA OPA211 ±18 V 80 MHz ±50 nA OPA188 ±18 V 2 MHz ±160 pA OPA170 ±18 V 1.2 MHz ±8 pA About the Author Rahul Prakash is a design and systems engineer in the precision digital to analog converters group at Texas Instruments. Rahul received his BTech in Electrical and Electronics Engineering from the Netaji Subhas Institute of Technology, India, and MS in Electrical Engineering from University of Texas at Dallas. Eugenio Mejia is an applications engineer in the precision digital to analog converters group at Texas Instruments. Eugenio received his Bachelors of Science in Electrical Engineering from Texas A&M University. 12 Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated TIDU543-October 2014 www.ti.com 9 Acknowledgements & References 1. Engineer It, What is a multiplying DAC (MDAC)? (Video) 2. Build a three phase sine wave generator with the UAF421 (SBFA013) 3. Design a 60 Hz notch filter with the UAF42 (SBFA012) 4. TLC7528, Digitally-controlled state-variable filter application information (SLAS062E) 5. TIPD137, ±10V 4-Quadrant Multiplying DAC (TIDU031) TIDU543-October 2014 Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated 13 www.ti.com Appendix A. A.1 Electrical Schematic Figure A-1: Electrical Schematic A.2 Bill of Materials Figure A-2: Bill of Materials 14 Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated TIDU543-October 2014 www.ti.com Appendix B. B.1 Center/Cut Off Frequency Simulation & Measurements Figure B-1: Cut-off frequency simulation – Low pass output Figure B-2: Cut-off frequency measurement – Low pass output Table 8. Low Pass Frequency Results Code 0x0004 0x8000 0xFFFF TIDU543-October 2014 Simulated Freq. 2.2138 Hz 17.1738 kHz 36.81 kHz Measured Freq. 1.9387 Hz 16.8585 kHz 35.6480 kHz Error -12.45 % -1.84 % -3.16 % Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated 15 www.ti.com Figure B-3: Cut-off frequency simulation – Band pass output Figure B-4: Cut-off frequency measurement – Band pass output Table 9. Band Pass Frequency Results Code 0x0004 0x8000 0xFFFF 16 Simulated Freq. 2.2514 Hz 17.7834 kHz 35.4852 kHz Measured Freq. 1.9387 Hz 16.7400 kHz 35.7890 kHz Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated Error -13.89 % -5.87 % 0.86 % TIDU543-October 2014 www.ti.com B.2 Gain Simulation & Measurements Figure B-5: Gain simulation – High pass output Figure B-6: Gain measurement – High pass output Table 10. High Pass Gain Results @ 50 kHz Code 0x0004 0x8000 0xFFFF TIDU543-October 2014 Simulated Gain -52.8254 dB 1.2612 dB 7.3731 dB Measured Gain -45.7880 dB 1.1631 7.3293 Error -7.04 dB 0.10 dB 0.04 dB Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated 17 www.ti.com Figure B-7: Gain simulation– Band pass output Figure B-8: Gain measurement – Band pass output Table 11. Band Pass Gain Results Code 0x0004 0x8000 0xFFFF 18 Simulated Gain 3.7835 dB -2.2214 dB -56.3345 dB Measured Gain 3.5845 dB -2.4316 dB -53.9780 dB Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated Error 0.20 dB 0.21 dB -2.36 dB TIDU543-October 2014 www.ti.com B.3 Quality Factor Simulation & Measurements The quality factor is calculated using Equation (9), the center frequency (fc) and the -3 dB bandwidth (Δf3dB) of the bandpass filter. Q TIDU543-October 2014 fc f 3dB Digitally Tunable MDAC based State Variable Filter Copyright © 2014, Texas Instruments Incorporated (9) 19 IMPORTANT NOTICE FOR TI REFERENCE DESIGNS Texas Instruments Incorporated ("TI") reference designs are solely intended to assist designers (“Buyers”) who are developing systems that incorporate TI semiconductor products (also referred to herein as “components”). Buyer understands and agrees that Buyer remains responsible for using its independent analysis, evaluation and judgment in designing Buyer’s systems and products. TI reference designs have been created using standard laboratory conditions and engineering practices. TI has not conducted any testing other than that specifically described in the published documentation for a particular reference design. TI may make corrections, enhancements, improvements and other changes to its reference designs. Buyers are authorized to use TI reference designs with the TI component(s) identified in each particular reference design and to modify the reference design in the development of their end products. HOWEVER, NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE TO ANY OTHER TI INTELLECTUAL PROPERTY RIGHT, AND NO LICENSE TO ANY THIRD PARTY TECHNOLOGY OR INTELLECTUAL PROPERTY RIGHT, IS GRANTED HEREIN, including but not limited to any patent right, copyright, mask work right, or other intellectual property right relating to any combination, machine, or process in which TI components or services are used. Information published by TI regarding third-party products or services does not constitute a license to use such products or services, or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI. TI REFERENCE DESIGNS ARE PROVIDED "AS IS". TI MAKES NO WARRANTIES OR REPRESENTATIONS WITH REGARD TO THE REFERENCE DESIGNS OR USE OF THE REFERENCE DESIGNS, EXPRESS, IMPLIED OR STATUTORY, INCLUDING ACCURACY OR COMPLETENESS. TI DISCLAIMS ANY WARRANTY OF TITLE AND ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT, QUIET POSSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO TI REFERENCE DESIGNS OR USE THEREOF. TI SHALL NOT BE LIABLE FOR AND SHALL NOT DEFEND OR INDEMNIFY BUYERS AGAINST ANY THIRD PARTY INFRINGEMENT CLAIM THAT RELATES TO OR IS BASED ON A COMBINATION OF COMPONENTS PROVIDED IN A TI REFERENCE DESIGN. IN NO EVENT SHALL TI BE LIABLE FOR ANY ACTUAL, SPECIAL, INCIDENTAL, CONSEQUENTIAL OR INDIRECT DAMAGES, HOWEVER CAUSED, ON ANY THEORY OF LIABILITY AND WHETHER OR NOT TI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, ARISING IN ANY WAY OUT OF TI REFERENCE DESIGNS OR BUYER’S USE OF TI REFERENCE DESIGNS. TI reserves the right to make corrections, enhancements, improvements and other changes to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latest issue. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All semiconductor products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment. TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI’s terms and conditions of sale of semiconductor products. Testing and other quality control techniques for TI components are used to the extent TI deems necessary to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarily performed. TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products and applications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provide adequate design and operating safeguards. Reproduction of significant portions of TI information in TI data books, data sheets or reference designs is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additional restrictions. Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements concerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or support that may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards that anticipate dangerous failures, monitor failures and their consequences, lessen the likelihood of dangerous failures and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the use of any TI components in Buyer’s safety-critical applications. In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is to help enable customers to design and create their own end-product solutions that meet applicable functional safety standards and requirements. Nonetheless, such components are subject to these terms. No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the parties have executed an agreement specifically governing such use. Only those TI components that TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use in military/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components that have not been so designated is solely at Buyer's risk, and Buyer is solely responsible for compliance with all legal and regulatory requirements in connection with such use. TI has specifically designated certain components as meeting ISO/TS16949 requirements, mainly for automotive use. In any case of use of non-designated products, TI will not be responsible for any failure to meet ISO/TS16949. Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265 Copyright © 2014, Texas Instruments Incorporated