Generating Complex Waveforms from Functions - Page 1
Forum section: electronics / projects

author: Poe
author_rank: Frequent Contributor
timestamp: July 08, 2015, 05:30:08 pm
content: I'm not proficient enough with op-amps to design circuits which can generate outputs faithful to a complex math functions.Luckily I now have an opportunity to learn. They haven't told me the application yet, but I've been tasked with designing a circuit to generate waveforms which adhere to one of several different functions. e.g. x^5Now I'm just looking for someone to point me toward books/papers on the subject or offer some design advice in regard to what method I should consider (op-amps, something else?).It's still early in the design phase and I don't know much. No word on cost/volume/etc. This customer is typically low volume niche stuff. All I know is that there's a slightly different function for each product and I can consider a completely different hardware circuit for each product if needed. In their words "It doesn't have to be supper accurate or super cheap", but apparently we are trying to improve on an existing system that simulated each signal with two to upwards of six flat slopes... kind of like they do with cheap 'log' potentiometers. The system will have "multiple voltage rails" and operate over a "large" temperature range.

author: tggzzz
author_rank: Super Contributor
timestamp: July 08, 2015, 05:44:19 pm
content: Consider doing using only analogue components. Start with Analog Device's special function chips, have a look at their application notes and books written by their staffers, e.g. Walt Jung.Consider doing the function in the digital domain: ADC -> function -> DAC.Consider parameters such as speed, repeatability, stability, out-of-range operation.Look at my .sig

author: w2aew
author_rank: Super Contributor
timestamp: July 08, 2015, 06:20:29 pm
content: Check out this book (it's almost cheating though...)http://www.amazon.com/Nonlinear-Circuits-Handbook-Analog-Devices/dp/091655001X

author: plesa
author_rank: Frequent Contributor
timestamp: July 08, 2015, 06:49:02 pm
content: It looks like interesting material!! ThanksSlightly better link :-)http://www.kelm.ftn.uns.ac.rs/literatura/mpi/pdf/Nonlinear%20Circuit%20Handbook.pdf

author: Poe
author_rank: Frequent Contributor
timestamp: July 08, 2015, 08:07:08 pm
content: Quote from: w2aew on July 08, 2015, 06:20:29 pmLooks perfect. Thank you all.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 08, 2015, 10:56:02 pm
content: Some general ideas:Consider the function and the arithmetic that goes into it. Many functions can be directly computed: addition and subtraction, multiplication by a constant.Multiplying by a joint variable is harder, but usually done by taking advantage of logarithms and exponents.The inverse of any one-to-one function can be computed by placing it in the feedback path of an amplifier; in effect, the amplifier solves for the input corresponding to the given output.Time is very valuable. Consider differential equations that might produce the desired function, and how to solve them over time. Use resistors and capacitors to your advantage; integration and differentiation.You might have quite a lot of trouble calculating sin(x) from first principles, but using an integrator to generate a ramp, a comparator to pick a point on that ramp, and a sampler to pick a point on a synchronized sine wave oscillator, you can easily find this value: given the limitations of time delay, sampling (rather than being a continuous-time function) and oscillator distortion, to name a few, of course.You can sample points or generate events from these waveforms, which can have further combinational effects: the pulses can be multiplied by another value, to get pulse width multiplication effects. You're limited only by your imagination!The space of possibilities is much the same as used in the olden days of video games, for generating interesting patterns and movements (especially of animations and enemy positions): creatures might bob up and down or zig-zag across the screen, following simple differential equations that were easily computed (using conditionals, integrals and addition, avoiding expensive operations like multiplication, division or exponentiation). In old games, often particles would only travel in straight (vertical or horizontal) directions; you could always tell the good ones, where they went to the effort to make funny angles, or tracking projectiles, and stuff like that. Only a matter of coming up with the right solution, and packing it in within the required time frame.Tim

author: f5r5e5d
author_rank: Frequent Contributor
timestamp: July 08, 2015, 11:49:09 pm
content: its really hard to find situations where ADC/DAC integrated with a uC won't be the answer below MHz, especially if different functions, large temp range are needed