Continue to Site

# Differentiation of two variables in an analogue computer.

Status
Not open for further replies.

#### Hyperionza

##### New Member
Good day to everyone,

I am a masters in computer science student so my knowledge of electronics is pretty much that of a hobbyist. Unfortunately my dissertation touches into the realm of analogue computers, and, to be frank Im a little lost.

My problem is that, in an example Im using, Im required to differentiate two dependent variables, call them x and y. However, it is my understanding, that in an analogue computer, you may only differentiate one dependent variable per op-amp and your independent variable is time.

Thus I know I can compute dx/dt and dy/dt. But, how can I relate them to give me dy/dx?

Is it possible to, in an analogue computer do the following to achieve the result I want. I remember seeing something like it somewhere but Ive no idea where!

1.1) Calculate dx/dt
1.2) Calculate dy/dt
2) Invert dx/dt (ie: 1 ÷ dx/dt)
3.1) ln(1 ÷ dx/dt)
3.2) ln(dy/dt)
5) antilog the result of 4

If Im completely wrong, would someone mind please steering me on the right course? Google hasnt been very helpful today...

An inverting op amp can have an arbitrary number of inputs with a series capacitor in each input to provide differentation. The differentation time constant (gain) for each input is determined by the capacitor value and the op amp feedback resistor value.

Separate op amps are typically used for differentation so that the gain of each differentiator can be controlled by the feedback resistor value rather than the capacitor value, which is more difficult to vary.

In practice a small resistor is often added in series with each capacitor to reduce high frequency noise, which is otherwise preferentially amplified by a differentiator.

An inverting op amp can have an arbitrary number of inputs with a series capacitor in each input to provide differentation. The differentation time constant (gain) for each input is determined by the capacitor value and the op amp feedback resistor value....

But wouldn't this just differentiate the individual input with respect to time, and then just sum them together? That is not what the OP is looking for.

But wouldn't this just differentiate the individual input with respect to time, and then just sum them together? That is not what the OP is looking for.
You're right of course.

I was only answering his question about using one op amp to differentiate two signals. That obviously wouldn't work if he wants to perform different subsequent operations the the two differentiations as he stated he needs.

Good day to everyone,

I am a masters in computer science student so my knowledge of electronics is pretty much that of a hobbyist. Unfortunately my dissertation touches into the realm of analogue computers, and, to be frank Im a little lost.

My problem is that, in an example Im using, Im required to differentiate two dependent variables, call them x and y. However, it is my understanding, that in an analogue computer, you may only differentiate one dependent variable per op-amp and your independent variable is time.

Thus I know I can compute dx/dt and dy/dt. But, how can I relate them to give me dy/dx?

Is it possible to, in an analogue computer do the following to achieve the result I want. I remember seeing something like it somewhere but Ive no idea where!

1.1) Calculate dx/dt
1.2) Calculate dy/dt
2) Invert dx/dt (ie: 1 ÷ dx/dt)
3.1) ln(1 ÷ dx/dt)
3.2) ln(dy/dt)
5) antilog the result of 4

If Im completely wrong, would someone mind please steering me on the right course? Google hasnt been very helpful today...

In step 2, the reciprocal function would require an analog divider, but recognize that ln(1/x)=-ln(x). Therefore, ln(1/(dx/dt))=-ln(dx/dt).
Keep in mind that you can only take the log of a positive number, while derivatives can be either positive or negative.

Last edited:
If we are talkin about analog electronics (dont know what this analog computer is), then yes, you can integrate and differentiate.

If we are talkin about analog electronics (dont know what this analog computer is), then yes, you can integrate and differentiate.
Errmmm, I think that was a given...

If we are talkin about analog electronics (dont know what this analog computer is), then yes, you can integrate and differentiate.
An Analog Computer uses (no surprise) analog differentiators, integrators, summing amps, etc. (typically performed by op amp circuits) to perform analog computations involving integral/differential equations. They were used before digital computers were commonly available.

The Norden Bombsight of WWII fame was a complex analog computer using gears and other mechanical devices to perform the computations to calculate when it was optimum to drop the bombs (no electronics involved).

Thank you all for your replies. They have so far been helpful! However, they dont answer the question completely

@crutschow: your first reply would calculate dx/dt + dy/dt. Although I never knew this was possible, it doesn't quite help in working out dy/dx, or at least, if it does I dont see how.

@Roff: Steps 2 and 3.1 are the steps Im most worried about, perhaps I should elaborate on the reasoning for them.

Steps 2 - 5 are intended to be the steps that transform dx/dt and dy/dt into dy/dx. Effectively something like:

dy dt dy
-- * -- = --
dt dx dx

It is my understanding that you cannot directly multiply two variables, or in our case, voltages. I attempted to achieve this in steps 3 - 5.

V1 * V2 = Antilog(log(V1) + log(V2))

This would only work if I had the reciprocal of dx/dt. or have I missed the boat and fallen off the pier as well?

@Roff: Steps 2 and 3.1 are the steps Im most worried about, perhaps I should elaborate on the reasoning for them.

Steps 2 - 5 are intended to be the steps that transform dx/dt and dy/dt into dy/dx. Effectively something like:

dy dt dy
-- * -- = --
dt dx dx

It is my understanding that you cannot directly multiply two variables, or in our case, voltages. I attempted to achieve this in steps 3 - 5.

V1 * V2 = Antilog(log(V1) + log(V2))

This would only work if I had the reciprocal of dx/dt. or have I missed the boat and fallen off the pier as well?
I think I understand what you are trying to do, and I already addressed your most recent questions.
Reread my first post. I was trying to show you how to get the reciprocal of dx/dt. What I was saying is, take the ln of dx/dt, then invert it with an inverting op amp. This will give you ln(1/(dx/dt)). You obviously don't actually get the reciprocal of dx/dt, but you get the ln of it, which is all you need.
If you don't understand it, post specific questions about it.

EDIT: As I said before, keep in mind that you can only take the log of a positive number, while derivatives can be either positive or negative.This may be a killer.

Last edited:
It is my understanding that you cannot directly multiply two variables, or in our case, voltages.
You can multiply two voltages with an IC 4-quadrant multiplier. They are built by Analog Devices, TI, and others. The can be used to multiply or divide two signals, or generate the square or square root of a single signal.

Last edited:
@Roff: My bad, sorry. I misread your first post and I see what you're saying now. I was taking the steps ("log of the inverse") too literally without actually understanding completely what I was doing. You have just made my life a great deal easier actually Thank you! I do know about most of the limitations and expectant input conditions of the circuits to keep them stable. Though there might be another forum thread on this in the future if\when I get stuck

This next part actually goes outside the scope of the example. The purpose of the example was to show that some operations that might appear trivial, are actually quite complex. It was never supposed to get into the actual circuitry side. But now curiosity has me and Im famous for going off on tangents in my department.

The first question is about the adding part then. Would I have to negate ln(dx/dt) before the summing opamp? Or could I get away with applying ln(dx/dt) to the inverting input and ln(dy/dt) to the non-inverting input?

The second questions is what would actually happen if I tried to ln a negative number in this environment? Its very tempting to haul out my copy of ngspice and see except Im still learning how to write and use netlists.

Third and last question, which Id probably end up posting at some point after Id started simulating and breaking the simulation. How do you find the absolute value of a voltage? I wont be able to +√(x²) as, in all likelyhood, the circuit will exceed Vmax under certain circumstances. And to be honest at 0130 AM... Im not thinking straight. Could I use a variation of a bridge rectifier? 'variation' because Id have to keep the ground common wouldnt I? Perhaps at this time of morning I should just ask if I could do it with diodes...

Just thought of another question...sorry. If I take the absolute value of the inputs... how would I preserve the sign of the output? both of you got me thinking when you mentioned '4-quadrant' and 'log of a positive number'...

@crutschow: The textbooks Ive read over the last 4 months have all been published between 1955 - ±1977 back when this stuff was more widely known and used. Ive only just come across Hans Camerzind's book available from Designing Analog Chips by Hans Camenzind recently. If I remember it was published in 2000 or 2004. So my knowledge to date is apparently out of date and limited to the atomic functions. But since a small part of the dissertation is about designing analogue circuits, I think that the atomic building blocks are important. I believe I should try understand them and their limitations. But it will be useful to add that there are these pre-designed IC's. Thank you for the heads up on this! To make an analogy to computers, people ask me why I program in Assembler when I have tools like C# (a 4th generation programming language) available to me. I have more control and understanding of the environment for which Im creating a program, tweaking and optimizing that program thus become easier and faster.

Sorry for the rambling but this is generally how I think. Some of those questions above Ill have to sort out for myself, I just thought of them and had to write them down before I forgot them.

Thank you, both of you, for your replies. You have definitely answered the original post by now, and more!

The first question is about the adding part then. Would I have to negate ln(dx/dt) before the summing opamp? Or could I get away with applying ln(dx/dt) to the inverting input and ln(dy/dt) to the non-inverting input?
You can do this with a .

The second questions is what would actually happen if I tried to ln a negative number in this environment? Its very tempting to haul out my copy of ngspice and see except Im still learning how to write and use netlists.
Since ln(x) is asymptotic to -∞ as ln(x) approaches zero, the op amp will limit at the negative supply rail. As Carl pointed out, you could use an analog multiplier (look at AD633) with feedback to perform division, avoiding this limitation.
Third and last question, which Id probably end up posting at some point after Id started simulating and breaking the simulation. How do you find the absolute value of a voltage? I wont be able to +√(x²) as, in all likelyhood, the circuit will exceed Vmax under certain circumstances. And to be honest at 0130 AM... Im not thinking straight. Could I use a variation of a bridge rectifier? 'variation' because Id have to keep the ground common wouldnt I? Perhaps at this time of morning I should just ask if I could do it with diodes...
Use a precision full wave rectifier (Google).

Roff, I owe you! Thanks! Youve answered the original question, and both you and crutschow have answered and cleared up even more ancillary questions that popped up.

Hyperionza,

You already know how to differentiate the two separate x and y terms.

How you subsequently combine those outputs depends on what you want to do with the partial products.

You can add them together with a summing amplifier, dy + dx.

You can subtract them with a differential amplifier dy - dx.

You can multiply them in an analog multiplier, dy x dx.

Or you can divide them as I suspect you need to do to get the dy/dx result.

In other words output (from a divider) = input Y divided by input X

The first would be to use a pair of logarithmic amplifiers, and a differential amplifier (subtractor) than an antilog amplifier.
Do able, but really nasty.

A much better way, would be to use an analog multiplier in the feedback loop of an op amp, to provide the division function.

here is a data sheet for a typical commercial analog multiplier/divider chip.
MPY100 Datasheet pdf - Multiplier/Divider - Texas Instruments

One of those should give you dy/dx if you feed dy and dx into it.

Last edited:

The first would be to use a pair of logarithmic amplifiers, and a differential amplifier (subtractor) than an antilog amplifier.
Do able, but really nasty.

Im beginning to realize just how nasty, and potentially unstable, it really is, but like I said, my knowledge of electronics is extremely basic! I fiddled with circuits as a kid and learned a thing or two from my grandfather. The textbooks Ive located in the campus library and have been reading, have all been published between 1956 till late 1970's, half of them still refer to valves The first time I read about a 4 quadrant multiplier was in this thread.

A much better way, would be to use an analog multiplier in the feedback loop of an op amp, to provide the division function.

ummmm, you lost me!
Would, say dy be connected to the opamp, dx be connected to one of the multiplier inputs, the other multiplier input connected to the output of the opamp, and the multiplier output fed back into the opamp?

what configuration would I use the opamp in? inverting or non-inverting? would it be considered positive or negative feedback?

Hyperionza,

Look up the link I provided to the Texas Instruments multiplier/divider.

Scroll down to page 9 and the "division" function.

It is basically designed to be an analog multiplier, but can also be configured to produce division, square, and square root functions by suitably connecting the three inputs, and provision of suitable feedback.

Everything you need is all there for division, you just need to connect it up as shown.

It has a multiplier followed by the required amplifier (Z input).

Last edited:
<sheepish expression> I did download and read it... I just didnt get that far. Thats the 2nd or 3rd time Ive done that recently next time I guess should finish reading before I ask stupid questions again. I got lost way before 'Typical Performance Curves' so I stopped there thinking the rest of the datasheet would be more of the same.

Thanks again Warspeed!

Sorry, entirely my error.

I knew exactly what I was looking for, so held my breath and dived deep straight down to page nine.
Should have given you a lot more guidance of where to look.

Cheers..........

Status
Not open for further replies.