Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > General Electronics Chat


General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion?

Reply
 
Tools
Old 26th October 2009, 12:59 PM   #1
Default Differentiation of two variables in an analogue computer.

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)
4) add 3.1 to 3.2
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...

Thanks in advance!
Hyperionza is offline  
Old 26th October 2009, 06:27 PM   #2
Default

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.
__________________
Carl
Curmudgeon Elektroniker
crutschow is offline  
Old 26th October 2009, 07:36 PM   #3
Default

Quote:
Originally Posted by crutschow View Post
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.
__________________
Mike ML.
MikeMl is online now  
Old 26th October 2009, 08:14 PM   #4
Default

Quote:
Originally Posted by MikeMl View Post
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.
__________________
Carl
Curmudgeon Elektroniker
crutschow is offline  
Old 26th October 2009, 09:23 PM   #5
Default

Quote:
Originally Posted by Hyperionza View Post
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)
4) add 3.1 to 3.2
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...

Thanks in advance!
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.
__________________
Ron


Last edited by Roff; 26th October 2009 at 09:26 PM.
Roff is offline  
Old 26th October 2009, 11:03 PM   #6
Default

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

Differentiator and integrator circuits : OPERATIONAL AMPLIFIERS
tresca is offline  
Old 26th October 2009, 11:21 PM   #7
Default

Quote:
Originally Posted by tresca View Post
If we are talkin about analog electronics (dont know what this analog computer is), then yes, you can integrate and differentiate.

Differentiator and integrator circuits : OPERATIONAL AMPLIFIERS
Errmmm, I think that was a given...
__________________
Ron

Roff is offline  
Old 27th October 2009, 12:11 AM   #8
Default

Quote:
Originally Posted by tresca View Post
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).
__________________
Carl
Curmudgeon Elektroniker
crutschow is offline  
Old 27th October 2009, 01:30 PM   #9
Default

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?
Hyperionza is offline  
Old 27th October 2009, 10:56 PM   #10
Default

Quote:
Originally Posted by Hyperionza View Post
@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.
__________________
Ron


Last edited by Roff; 27th October 2009 at 11:03 PM.
Roff is offline  
Old 28th October 2009, 12:14 AM   #11
Default

Quote:
Originally Posted by Hyperionza View Post
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.
__________________
Carl
Curmudgeon Elektroniker

Last edited by crutschow; 28th October 2009 at 12:15 AM.
crutschow is offline  
Old 28th October 2009, 01:20 AM   #12
Default

@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!
Hyperionza is offline  
Old 28th October 2009, 03:28 PM   #13
Default

Quote:
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 differential amplifier.

Quote:
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.
Quote:
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).
__________________
Ron

Roff is offline  
Old 28th October 2009, 10:30 PM   #14
Default

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 is offline  
Old 29th October 2009, 08:32 AM   #15
Default

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

There are two fundamentally different ways to go about this,

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 by Warpspeed; 29th October 2009 at 08:35 AM.
Warpspeed is offline  
Reply

Tags
analogue, computer, differentiation, variables

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
differentiation confounded Math and Physics 2 16th June 2009 02:19 PM
Help with differentiation Graemermac Math and Physics 2 2nd June 2009 01:34 PM
weight differentiation gilardino Electronic Projects Design/Ideas/Reviews 4 6th March 2009 06:24 AM
Differentiation help please gizzemoto Math and Physics 21 15th October 2008 01:23 AM
High frequency differentiation circuit not working user1453 General Electronics Chat 15 17th August 2006 10:30 PM



All times are GMT. The time now is 06:24 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker