MembersPage/NickLaTech/AnalogANDAnalogProblem (2005-03-23 00:36:09)

Homework assignment

---

3 analog inputs from 0 to 5 volts

1 output from 0 - 5 volts


3 inputs defined as i1,i2,i3

1 output defined as o1

notation: i1,i2,i3 => o1

0,4,0.1 => 1.1

0,2,0.1 => 1.2

3,4,0.2 => 3.1

1,4,0.3 => 2.1

many of these

contraint: no DAC or microprocessor. Obviously they want an OPA solution.

That means inputs are weighted.

Weight can be negative, actually 2nd weight is negative and exactly -0.05 =(1.1-1.2)/(4-2) as it's obvious from 1st and 2nd line where input vector just differs in 2nd input variable .

I expected to find a linear relationship which is damn easy with OPA-s:\nÿ1ÿ

No luck, 3.9333 != 2.1.


The trick is to make an additive offset.

Step1: find additive offset: output for 0 inputvector

0,0,0 => ?

This is done by linearly combining the 4 input vectors.

I start it for you, by making first number 0:

0,4,0.1 => 1.1

0,2,0.1 => 1.2

From 3d line we subtract 3*(4th line):

3,4,0.2 => 3.1

-3*

1,4,0.3 => 2.1

=

0,-8,-0.7 => -3.2

While from 4th line we subtract 1/3*(3d line):

1,4,0.3 => 2.1

-1/3*

3,4,0.2 => 3.1

=

0,...,... => ...

Now our equations are:

0,4,0.1 => 1.1

0,2,0.1 => 1.2

0,-8,-0.7 => -3.2

0,...,... => ...

Just continue eliminating 2nd and 3d column to get output for 0 input vector.


Step2 : subtract the offset from the output

Step3 : calculate the a1 weights

Same as

a1=inverse(x1) * o1'

above, that is with matrix inversion. This time you'll see that 4th line will match the weights just fine.