AWG that you can feed in math equations? - Page 1
Forum section: electronics / testgear

author: nbritton
author_rank: Frequent Contributor
timestamp: October 12, 2015, 10:05:41 pm
content: Do you know of an AWG that you can give math functions with variables (such as y = x/(x+0^sin(x))) and it will compute the value of x,y and output the result? Exactly like a graphing calculator, but with waveforms. In paticular, I would like something that can reproduce non periodic waveforms.

author: dadler
author_rank: Unknown
timestamp: October 12, 2015, 11:41:06 pm
content: Literally input into the device via the UI, or using PC software?

author: nbritton
author_rank: Frequent Contributor
timestamp: October 13, 2015, 12:42:32 am
content: Quote from: dadler on October 12, 2015, 11:41:06 pmAny signal generation method would work. However, the math functions could be constantly changing over time, for instance sin(x^2), so in other words you would need infinite sample points to represent the function. This inherently would need to be driven by a microprocessor, could you use SCPI to drive the instrument?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 13, 2015, 02:32:46 pm
content: If you can phrase it as a differential equation, it would be pretty reasonable to do, even at high speed with hardware (given a limited supply of MACs, difference registers, and so on, of course).But that's still a poor approach for test equipment, as there are many DEs which produce unbounded, complex or undefined results. That, and the dearth of people who know anything about DEs, means you won't find one already made.Tim

author: SteveLy
author_rank: Regular Contributor
timestamp: October 13, 2015, 04:06:13 pm
content: With something like a Raspberry Pi you could generate the digital output via GPIO and feed that to a DAC. You're probably looking at sub-MHz sample rate, few MHz at best (flat out you can get 20+ MHz switching rate from a single GPIO pin IIRC). Accurate timing is something that may limit the bandwidth further. It's something I plan to try and do with my RP2. Do an internet search for [arbitrary waveform raspberry pi].Here is one implementation, with C code for generating a triangle wave that could be easily modified to generate any function:http://skpang.co.uk/blog/archives/689

author: tggzzz
author_rank: Super Contributor
timestamp: October 13, 2015, 04:24:20 pm
content: Personally thelastthing I would want would be an AWG with a built-in way of specifying a waveform using maths.Why?I don't want to learn yet another scrotty little single-purpose DSL that is only useful with one instrumentI couldn't trust the implementation of the math library. There are many many subtle problems with floating point arithmetic libraries; ask anyone with an HPC or numerical analysis backgroundIt would be running in a tiny microcontroller, and hence very slowInevitably there will come a time when I can't specify what I want to do in the scrotty little DSL, e.g. a 64QAM signal degraded by passing through an imperfect radio channelThere are easy alternatives that avoid all the above disadvantagesHow would I do it? Use whateverpre-existingtool is convenient and available (a spreadsheet, Matlab, Java, my thesis' software etc etc) to generate the relevant samples, and download those to the AWG. Which has the ideal combination of a low learning curve, infinitely extensible, at least as good as a DSL, and sufficient.

author: SteveLy
author_rank: Regular Contributor
timestamp: October 13, 2015, 04:36:43 pm
content: Quote from: tggzzz on October 13, 2015, 04:24:20 pmOP wants to generate non-periodic signals so AWG with sample table is not going to do it.

author: tggzzz
author_rank: Super Contributor
timestamp: October 13, 2015, 04:51:53 pm
content: Quote from: SteveLy on October 13, 2015, 04:36:43 pmIn that case he is going to run into two non-trivial problems: accumulation of floating point "errors" and whether the maths engine inside the AWG can generate points sufficiently fast.

author: Marco
author_rank: Super Contributor
timestamp: October 13, 2015, 06:06:41 pm
content: Quote from: nbritton on October 12, 2015, 10:05:41 pmDo you mean non periodic non finite functions, like chaotic functions?How aboutSimulink Real-Time?

author: Fungus
author_rank: Super Contributor
timestamp: October 13, 2015, 06:23:56 pm
content: Quote from: T3sl4co1l on October 13, 2015, 02:32:46 pmWouldn't it go totally out of sync after a few minutes unless you had infinite precision math?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 13, 2015, 06:39:38 pm
content: Quote from: Fungus on October 13, 2015, 06:23:56 pmHeh... But how would you know?Actually, with integer math, the precision is exact. If you've formulated the coefficients, the rounding is entirely up to you alone (where you round them, anyway -- as you don't have a choice not to).In practice, most such equations will incur rounding error at some point or another, because of using fixed point adjustments on an otherwise ideally real-valued system of equations.Note that I used the term "difference registers", as opposed to derivatives and such (though I did still call it "differential equation" at the first, there, for which I apologize). A difference equation has a finite timestep, and furthermore we can simply state that it will be in the integer domain, and therefore will be perfectly accurate to itself (how tautological..). Perhaps even more specifically, in a 2^N sized ring, so we get overflow for free (but saturating arithmetic would be a close second).For the purposes where you would want an aperiodic or chaotic system, I don't see how it would ever matter that you have exact (real valued) precision.For the purposes where you do want something like that, a much more standard solution is a PRBS (pseudorandom binary sequence), which traditionally has flat statistics. And also belongs natively to the integers, so is very easy to compute!Tim

author: tggzzz
author_rank: Super Contributor
timestamp: October 13, 2015, 06:51:12 pm
content: Quote from: T3sl4co1l on October 13, 2015, 06:39:38 pmA naive implementation would "get stuck" or "rollover".Informallyconsider computing sin(X) and sin(X+1) where X=1010.For more information, which I doubtyouneed, have a look athttp://people.ds.cam.ac.uk/nmm1/Arithmetic/index.html. MacLaren's other stuff is worth understanding, since he's been pushing the HPC envelope since the 60s, and knows where many skeletons are (partially) buried.QuoteYes, it can all be done, but is isn't trivial and there are too many application dependent special cases which would scupper using it in a general purpose instrument.QuoteYup!

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 13, 2015, 07:21:47 pm
content: Quote from: tggzzz on October 13, 2015, 06:51:12 pmThat's the beauty of difference equations -- they always simply march onward. You don't necessarily even need division, just throw stuff into another register -- consider Bresenham's line algorithm for instance.Of course, a sufficiently "naive" implementation might not have a clue about difference equations, in which case trying to enter something as poorly conditioned as the above example, or trying to use them at all (what the $@&! are difference registers?), might well be the expected result.QuoteYes, numerical methods are very important, definitely recom\\\\\requiredreading for anyone looking to implement mathematical functions!Tim

author: nbritton
author_rank: Frequent Contributor
timestamp: October 13, 2015, 08:49:29 pm
content: Quote from: tggzzz on October 13, 2015, 04:51:53 pmAccumulate floating point errors? Assuming you had a fully fledged computer processor you could re-run the equation for each value of x. For a 14-bit DAC I think you would only need to compute 16,384 sample points per integer. i.g. 1, 1.1, 1.2, 1.3, ..., 2Also if you couldn't re-run the equation wouldn't 64-bit floating point math get you adequate precision for a few million calculations? I would think the error in the DAC's steps would be more of an issue then rounding errors.

author: SteveLy
author_rank: Regular Contributor
timestamp: October 13, 2015, 09:23:44 pm
content: Depends what you want to do with it, but you're right, for most "sane" applications 64-bit floating point would be plenty. You could run a 100Mhz signal off a double precision computation for a day before you'll get a 1% phase error. If you have a crazy chaotic iteratively updated function then sure, it'll run away on you, but that's the nature of the beast. So really the precision of the maths is not the problem to crack here.

author: tggzzz
author_rank: Super Contributor
timestamp: October 13, 2015, 09:49:03 pm
content: Quote from: nbritton on October 13, 2015, 08:49:29 pmI'm sorry, I don't understand that and certainly cannot reconcile it with other statements in this thread. It may (or may not) be a simple differing interpretation of words like "non-periodic".It might help of you could give a concrete example of a maths function input and the AWG output you would expect.

author: tggzzz
author_rank: Super Contributor
timestamp: October 13, 2015, 09:52:01 pm
content: Quote from: SteveLy on October 13, 2015, 09:23:44 pmIt seems like you aren't familiar with numerical analysis in the context of computer arithmetic.Apart from that, sure 1024(or whatever!) bit FP arithmetic may delay the inevitable, but there practical considerations in an AWG.

author: tggzzz
author_rank: Super Contributor
timestamp: October 13, 2015, 10:02:39 pm
content: Quote from: T3sl4co1l on October 13, 2015, 07:21:47 pmIs there a mechanical way of transforming an arbitrarily complex function into a difference equation form?About a quarter of a century ago I had to go through the paperwork for exporting munitions(!) from the US to the UK. No, it wasn't crypto; it was an HP DDS+DAC. The cleverness was in the way they enabled sample-by-sample control of the phase such that it was possible to "program" the device to emit long complex modulated radio signals. Reputedly it could fool front-line military aircraft into believing it was a pukka military "base station", and having the aircraft automatically make the appropriate responses.So yes, it is demonstrably possible to "program" DDSs using "aperiodic" "maths functions", but there was no way to manually transform an arbitrary maths function into "phase program". The computational models were just too dissimilar.

author: miguelvp
author_rank: Super Contributor
timestamp: October 14, 2015, 03:14:15 am
content: I might have missed it or it has not been mentioned.My understanding on how a AWG works is by performing some kind of DMA transfer from a memory buffer to the DACs, so how are you going to update the buffer and maintain synchronicity between the system generating the waveform values and the buffer?You would need at least a double buffering and probably a triple buffer so you don't starve the DACs.

author: joeqsmith
author_rank: Super Contributor
timestamp: October 14, 2015, 03:53:37 am
content: Sounds interesting, but without more information I would be guessing. Who knows, maybe your requirements would allow you to hook an R2R network to your printer port on your PC and update once every 10 seconds with some C app.Assuming you need the ARB, seems like it could be done depending on requirements. Some ARBs will support more than one page of memory. You use your favorite weapon to create the data stream and queue up the ARB. Then as the ARB cycles through the pages, you keep feeding the unused pages.I have never attempted this and have not played with a new ARB. The last one I used had a very slow bus. Tektronix was just starting to use Ethernet and I think they said that AWGxxxx was their first product with it. They had their TekVISA library. A mess.... I think GPIB was faster. Trigger was pretty poor unless you clocked it synchronous. I had to cobble up a 6GHz clock multiplier for that stupid thing.

author: JoeB83
author_rank: Regular Contributor
timestamp: October 14, 2015, 03:54:19 am
content: Every time I've mathematically modeled anything I've stuck the function into either a TI-89 or Excel. Have it work out an X-vs-Y chart and go from there.

author: SteveLy
author_rank: Regular Contributor
timestamp: October 14, 2015, 05:26:42 am
content: Quote from: tggzzz on October 13, 2015, 09:52:01 pmThe OP just wants a voltage V(t) defined as simple explicit funtion of the clock t. He is not time-evolving the quantum states of the DNA. Unfortunately the example the OP gave "y = x/(x+0^sin(x))" does not make much sense (i.e., it's just y = 1).Quote from: tggzzz on October 13, 2015, 06:51:12 pmWell, let's then do a bit of numerical analysis. Here you go, double precision arithmetic (64-bit floating point):Code:octave:2> sin(1e10), sin(1e10 - floor(1e10/(2*pi))*2*pi), sin(1e10 + 1), sin(1e10 + 1 - floor((1e10+1)/(2*pi))*2*pi)ans = -0.487506ans = -0.487506ans = 0.471304ans = 0.4713041.6 Gcycles into the function and it's still good for 6 significant figures. At 10MHz that is good for around 3 minutes.Let's up the stakes, go from 1010to 1012, or 160 Gcycles, about 5 hours at 10MHz:Code:octave:3> sin(1e12), sin(1e12 - floor(1e12/(2*pi))*2*pi), sin(1e12 + 1), sin(1e12 + 1 - floor((1e12+1)/(2*pi))*2*pi)ans = -0.611239ans = -0.611199ans = 0.335725ans = 0.335756Well, what do you know? We're still good for four significant digits; still plenty good enough for a 12-bit DAC after 5 hours, which I'm willing to bet is more than ample for the OP had in mind.But just to be sure we're not cheating, let's try something trickier and try to use:sin(A+B) = sinAcosB+ cosAsinBwithAandBlarge and small:Code:octave:4> a = 1e10; b = 1e12;octave:5> sin(a+b), sin(a)*cos(b)+cos(a)*sin(b), sin((a+b) - floor((a+b)/(2*pi))*2*pi)ans = -0.919519ans = -0.919519ans = -0.919518octave:6> a = 1e12a = 1.00000e+12octave:7> sin(a+1), sin(a+1 - floor((a+1)/(2*pi))*2*pi), sin(a-floor(a/(2*pi))*2*pi)*cos(1) + sin(1)*cos(a-floor(a/(2*pi))*2*pi)ans = 0.335725ans = 0.335756ans = 0.335772...octave:9> sin(a)*cos(1)+sin(1)*cos(b)ans = 0.335725No worries.

author: nbritton
author_rank: Frequent Contributor
timestamp: October 14, 2015, 05:59:06 am
content: Quote from: SteveLy on October 13, 2015, 09:23:44 pmI'm not doing anything crazy like that. At most I think the equation would run for a few hours, more likely I would just need a few minutes of non-periodic output.Fundamentally what I'm looking for is a AWG that can be scripted with a programming language. I think you can do this with the Red Pitaya.

author: Fungus
author_rank: Super Contributor
timestamp: October 14, 2015, 06:04:13 am
content: Quote from: SteveLy on October 14, 2015, 05:26:42 am...apart from the fact that it wasn't done using difference equations.

author: SteveLy
author_rank: Regular Contributor
timestamp: October 14, 2015, 06:16:18 am
content: Quote from: Fungus on October 14, 2015, 06:04:13 amThe OP is not after solving differential equations; that's a tangent some others here are pursuing. All the OP wants is to calculate an explicit function of time and have it converted to a voltage output. You're talking about iteratively updating the state: y(t+1) = F[y(t), y(t-1), ...]. That's not what the OP asked about. Neither did tggzzz's example of "getting stuck" involve anything of the sort; only that sin(x) can't be trusted at x = 1010:Quote from: tggzzz on October 13, 2015, 06:51:12 pm

author: Fungus
author_rank: Super Contributor
timestamp: October 14, 2015, 06:21:32 am
content: Quote from: tggzzz on October 13, 2015, 10:02:39 pmYou can calculate derivatives using finite differences.http://demonstrations.wolfram.com/FiniteDifferenceApproximationsOfTheFirstDerivativeOfAFunctio/It doesn't produce pretty formulas but it would work for this application. The only problem is that you don't know how many derivatives you'll need - what's the highest power of 'x' in an "arbitrarily complex function"?

author: SteveLy
author_rank: Regular Contributor
timestamp: October 14, 2015, 06:22:35 am
content: Quote from: nbritton on October 14, 2015, 05:59:06 amCan you help get this thread find its feet and give us an example of the sort of function or equation you want to generate the signal with? The one you gave in the OP, y = x/(x+0^sin(x)), does not make sense. There must be a typo. As written it's just a fancy way of writing y = 1 for x > 0.

author: nbritton
author_rank: Frequent Contributor
timestamp: October 14, 2015, 06:23:15 am
content: Quote from: SteveLy on October 14, 2015, 06:16:18 amYes.

author: SteveLy
author_rank: Regular Contributor
timestamp: October 14, 2015, 06:26:38 am
content: Also, what sort of sampling rate are you looking for? How many samples per second?

author: Fungus
author_rank: Super Contributor
timestamp: October 14, 2015, 06:37:55 am
content: Quote from: SteveLy on October 14, 2015, 06:16:18 amOK, I got the subthreads mixed up.Quote from: SteveLy on October 14, 2015, 06:16:18 amI'm sure I could invent a pathological case for you but double precisionwould workwell enough for the device to be useful, yes.

author: nbritton
author_rank: Frequent Contributor
timestamp: October 14, 2015, 06:50:08 am
content: Quote from: SteveLy on October 14, 2015, 06:22:35 amSomething as simple as sin(x^2) would be a good start.

author: SteveLy
author_rank: Regular Contributor
timestamp: October 14, 2015, 07:03:57 am
content: Quote from: nbritton on October 14, 2015, 05:59:06 amSorry, my mistake for missing the negative exponents. So your function is either 1 or undefined. Any graphing program will tell you [well, most will] that zero to a negative power is NaN, Not-a-Number. Or if we go with the way you interpret it with 0^[negative number] = positive infinity (i.e., very large positive number), we get x/(x+0^b) = 0 for b < 0. So all you've got there then is a square wave of period 2*pi, which would be better expressed as, e.g., y = (sgn(sin(x)) + 1)/2, where sgn(x) is the sign function (-1, 0, or 1, for x < 0, = 0, > 0, respectively). To code it you might dispense with the sin function and use (floor(x/pi)+1)%2, where % indicates remained.So you don't need an AWG or non-periodic function generator: you just need a plain old square wave generator!Note, there is no values plotted for y = 0, (except at x = 0) because the function is undefined for sin(x)<0.

author: nbritton
author_rank: Frequent Contributor
timestamp: October 14, 2015, 07:20:45 am
content: Quote from: SteveLy on October 14, 2015, 07:03:57 amWe could talk about the semantics of undefined v. infinite until we're blue in the face, but as far as my computer is concerned it thinks 0 to a negative exponent is infinite, so I take pratical advantage of it. All of the graphing calculators I've run that equation through have calculated 0 to a negative exponent as infinite. I never actually checked if my graphing program had the sgn function.

author: SteveLy
author_rank: Regular Contributor
timestamp: October 14, 2015, 07:26:15 am
content: Sure if it works for you, use it. But still all you're getting is aperiodicsquare wave, which any old signal generator can generate. No need for AWGs etc.Edit:But if you ever want to generate fast-varying signals on the fly, your code needs to be optimised, and stuff like inf's and nan's will dramatically hamper performance. Highly optimised code will generally throw an error (because the error checking for these things is a waste of CPU cycles, so you debug them first with unoptimised code, then compile for speed). It's bad programming practice. You'll get into trouble as you get into more serious stuff. Also it makes for non-portable code. Sorry, I had to say it.

author: nbritton
author_rank: Frequent Contributor
timestamp: October 14, 2015, 07:29:19 am
content: Quote from: SteveLy on October 14, 2015, 07:03:57 amy = (sgn(sin(x^2)) + 1)/2There, now I have a non repeating function. I don't have an actual use case yet, I just want a AWG that is capable of being programmed with whatever crazy equation I think up. I like the precision of formulaic equations and I like playing with numbers. Really what I want is an AWG that I can program.

author: SteveLy
author_rank: Regular Contributor
timestamp: October 14, 2015, 07:46:17 am
content: Quote from: nbritton on October 14, 2015, 07:29:19 amThat makes for a square wave with frequency that goes like x/pi, i.e. time/pi. You can do that on a function generator with sweep functionality: set a start frequency and an end frequency and a sweep rate. You should explore what a half decent AWG or even an ordinary function generator with sweep and modulation can do. You may find that with a large selection of waveforms (including programmable for AWGs), sweep, amplitude and frequency modulation, and definitely with programmable amplitude and frequency sweeps, you'll have all the freedom you need.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 14, 2015, 12:17:26 pm
content: Quote from: tggzzz on October 13, 2015, 10:02:39 pmPossibly. Certainly there are pathological cases where one cannot do this (discontinuous functions, and missing derivatives, come to mind*), but for all other cases, difference equations can be used. Indeed, for chaotic systems, theonlyrepresentation is differential, and often a compact one at that.*But what thefuckare you doing, trying to recreate these on an AWG? There are noreal physicalsignals that do not have all derivatives, and which have unlimited bandwidth. Even that thing we call a "square" wave has a hard cutoff. So I would specify, any real signal that you can create, also has a differential representation, which can be approximated with a difference equation for sufficiently small timestep (or other computational methods like Runge-Kutta, root finding, matrix solutions (SPICE), etc.). Or, any method which happens to have the desired real result, as a consequence of those limitations: a square wave being a fine example of something that's easily computed (as an ideal waveform), and happens to produce a real signal, when pushed through real hardware.Any simple chaotic system (Lorenz Attractor, etc.) can be expressed as a differential equation (and a difference, for sufficiently small timestep and error), and usually quite modestly at that (only a few registers and multiplies required). The logistic map is an example already in difference format, which produces asymptotic, periodic, aperiodic or chaotic behavior depending on parameters. No chaotic system has an analytical f(t) solution, which is why this comes to mind first: it's the most powerful method of expressing aperiodic functions, and a relatively easy one.Standard trig can be had with the usuals: f'(t) = f(t) is exponential, f''(t) = -f(t) is sin/cos; Bessel functions don't have an analytical representation but are one-liners, with two derivatives I think?; and so on.As a general method, for a function that has derivatives, you can take as many as you need, and form an equation relating them together. The solution of that equation, for the correct initial values, should be the function you started with (if it isn't, you missed something!).For the example,f = sin(t^2)we havef' = 2*t*cos(t^2)andf'' = 2*cos(t^2) - 2*t^2*sin(t^2)So we can substitute,f'' = f' / t - t^2*fProbably some other manipulations can be done to save on the multiplications or divisions, too.The difference equation is just what it says; using the definition of the derivative and Ts == timestep,t --> n / Tsf(t) --> f (n being fractions of Ts is implied)f' == (f - f[n+1]) / Tsf'' = {[(f - f) / Ts] - [(f[n+1] - f[n+2]) / Ts]} / Ts= (f - 2*f[n+1] + f[n+2]) / Ts^2So we get a DSP function that looks something like,(f - 2*f[n+1] + f[n+2]) / Ts^2 = (f - f[n+1]) / (Ts*n) - n^2*fand doing some algebra to solve for f[n+2], and shifting everything back by two n's since we aren't predicting the future here.Regarding computational methods, a different formulation of the difference derivative can be used, and the choice of f(t) --> f is somewhat arbitrary (we might use f[n+1] instead, say, or an interpolation of several nearby samples, ala Runge-Kutta).Tim

author: Marco
author_rank: Super Contributor
timestamp: October 14, 2015, 04:13:27 pm
content: Matlab with the data aquisition toolbox can do this without too much trouble, using queueOutputData and NotifyWhenScansQueuedBelow you can do real time signal generation. Should be relatively trivial to turn that into a custom script which you can just feed a function.

author: Dave
author_rank: Super Contributor
timestamp: October 14, 2015, 04:26:18 pm
content: I happened to stumble upon this thing on eBay today:Analogic Polynomial Waveform Synthesizer Model 2020SpecsIt would be pretty interesting to know how this things ticks.

author: joeqsmith
author_rank: Super Contributor
timestamp: October 15, 2015, 07:15:01 am
content: Quote from: Marco on October 14, 2015, 04:13:27 pmI was thinking Labview, but Scilab with XCOS or any other tool of choice. But maybe they want 20GS/s?? Seems like some really basic things are missing....

author: Armxnian
author_rank: Regular Contributor
timestamp: October 15, 2015, 07:54:25 am
content: How would a signal generator even reproduce something like sin(pi/x)? It would clip, or simply just blow up.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 15, 2015, 11:38:19 pm
content: Yeah well, sin(pi/x) is not a signal (around zero, it has unlimited bandwidth and undefined derivatives). So like I said before... what the fuck are you doing, trying to make a signal that's obviously nonphysical?Tim

author: nbritton
author_rank: Frequent Contributor
timestamp: October 16, 2015, 01:01:02 am
content: Quote from: T3sl4co1l on October 15, 2015, 11:38:19 pmI don't believe I ever said sin(pi/x), I said sin(x^2). Please let get back topic, the goal of this thread is to find a DDS that can be controlled using a general-purpose programming language.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 16, 2015, 01:38:15 am
content: Well, I addressed one way of producing that.Like I've been saying saying, I feel that differential equations are the way to go; they can't produce nonphysical results because they can be computed at a fixed timestep a.k.a. sample rate. Minding that not all *difference* equations happen to correspond exactly to a sampling process convolved with their *differential* functions (solutions), but given the scope of difficulty in correct mathematical formulation and numerical solution, it would seem unlikely that another method (perhaps simpler in terms of algebra but considerably heavier in computation) would be capable of performing anywhere near nameplate sample rate without precomputed tables (which are arguably prohibitive for aperiodic signals).And if you open it up for other parameterizations (like DDS phase/slope into a repeating table e.g. sin(theta)), certain (perhaps more frequently useful?) signals can be even simpler, e.g. y = x^2 --> dy = 2x dx --> y = y[n-1] + 2*n (*Ts implied) as an input to the phase increment register.So if that's not good enough, you're welcome to make one that evaluates expressions.As for *finding* (rather than making) one, has that not been answered..?!Quote from: Dave on October 14, 2015, 04:26:18 pmThat at least looks provocative enough, but you'd probably have to actually *find* one to tell if it meets your personal criteria or not ('cuz we don't know that).Tim

author: nbritton
author_rank: Frequent Contributor
timestamp: October 16, 2015, 01:50:46 am
content: Quote from: T3sl4co1l on October 16, 2015, 01:38:15 amYour writings detail a method for programming, you're putting the cart before the horse, I need a device first. The Analogic Polynomial Waveform Synthesizer Model 2020 looks neat, but it can't be programmed using a programming language and the device for sale is physically in Europe.

author: SteveLy
author_rank: Regular Contributor
timestamp: October 16, 2015, 02:43:04 am
content: You could write the values to an audio file and get the voltage out from your sound card. A good sound card will get you up to 192kHz sampling rate. It's enough for playing around, running some experiments..

author: Armxnian
author_rank: Regular Contributor
timestamp: October 16, 2015, 02:54:05 am
content: Quote from: nbritton on October 16, 2015, 01:50:46 amIf you can't find what you're looking for, then there are 2 reasons why.1. It doesn't exist, often times for a good reason.2. It does exist, but it is for a niche/professional application in which case you wouldn't be able to use/need or afford.Nearly all AWG already include the math functions you would use. You can draw the other ones. The simple fact that you still haven't said what you're going to use sin(x^2) for proves that you don't need it. If you want to observe cool looking functions, buy a graphic calculator.Quote from: SteveLy on October 16, 2015, 02:43:04 amI fried the op amps on my amp doing that once. But it was only a $1.41 repair

author: SteveLy
author_rank: Regular Contributor
timestamp: October 16, 2015, 04:24:52 am
content: Quote from: Armxnian on October 16, 2015, 02:54:05 amA linear freq sweep will give sin(x^2). A programmable sweep AWG will do practically anything, ie, p(f(x)*x), where p is arb periodic and f is arb.Quoteoops. Better buffer it then...

author: Armxnian
author_rank: Regular Contributor
timestamp: October 16, 2015, 05:43:22 am
content: Modifying an audio amp for outputting test signals is going to make it sound like crap, and be quite difficult on a pc motherboard, so I wouldn't bother. But it does make for some fun experiments as you have precise control over the signal and have a lot of dynamic range to work it. You can also use it for white and pink noise if you pair it with something like audacity. As long as you limit the power output you should be fine.

author: Marco
author_rank: Super Contributor
timestamp: October 16, 2015, 05:45:21 am
content: Quote from: nbritton on October 16, 2015, 01:01:02 am"Matlab with the data aquisition toolbox can do this without too much trouble, using queueOutputData and NotifyWhenScansQueuedBelow you can do real time signal generation. Should be relatively trivial to turn that into a custom script which you can just feed a function."A computer with a DAC board is a DDS and it can do it with just a little matlab programming required, if it took more than a 100 lines I'd be surprised.

author: nbritton
author_rank: Frequent Contributor
timestamp: October 16, 2015, 07:33:46 am
content: They make a device capable of this, it's called the Red Pitaya. It runs Linux on a dual core ARM Cortex A9+ with a Xilinx Zynq 7010 SoC FPGA. It's capable of two channel output at 50 MHz @ 125MSa/s. Cost is $238.80 USD.http://redpitaya.com