       Re: Engineering requests

• To: mathgroup at smc.vnet.net
• Subject: [mg125312] Re: Engineering requests
• From: Dana DeLouis <dana01 at me.com>
• Date: Tue, 6 Mar 2012 05:57:03 -0500 (EST)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com

```> (* using table   (correct answers)    *)
> R1=R1int;
> R2=R2int;
> Table[5/(Ra+Rb) Rb,{Ra,R1},{Rb,R2}]// Max
> Table[5/(Ra+Rb) Rb,{Ra,R1},{Rb,R2}]// Min
>
> Out= 1.34146
> Out= 0.985401

Hi.  I'm not an expert, but this can sometimes be a workaround...
Factor our your voltage for now, and work with...

y/(x + y);

Invert this, and just remember to invert it back in the final solution:

1/% // Apart

1 + x/y

Just for fun, here's a simple use of PlusMinus.
In this example, the second number is a percentage. (ie 10%)
You get the +- symbol by doing [esc] + - [esc]

PlusMinus[a_, b_] := Interval[{a - b*a/100, a + b*a/100}]

r1 = 100000 \[PlusMinus] 10

Interval[{90000, 110000}]

r2 = 30000 \[PlusMinus] 10

Interval[{27000, 33000}]

5./(1+r1/r2)

Interval[{0.985401,1.34146}]

Which matches what you gave as the solution.

As a side note, if r1 had a value (say 3) , and r2 was broken (ie infinite resistance)

5 r2/(3+r2) /. r2->\[Infinity]
Infinity::indet: Indeterminate expression 0 \[Infinity] encountered.
Indeterminate

The other way returns a value.

5/(1+3/r2) /. r2->\[Infinity]
5

Don't know if the following helps...

Needs["Units`"]
v = 3 Volt;
r = 3 Ohm;

Convert[r (v/r)^2, Watt]
3 Watt

As a side note, there were discussions back before Math 7 that the interval function
was going to be updated to work with these dependence issues.
However, it appears not to have happened yet as of ver 8.
I think it's a complex task.

= = = = = = = = = = =
HTH  : >)
Dana DeLouis
Mac & Math 8
= = = = = = = = = = =

On Mar 5, 2:43 am, "McHale, Paul" <Paul.McH... at excelitas.com> wrote:
> Daniel,
>
> Thanks for the ideas.  The minimalUnits[] is interesting.  It would be very interesting to assign variables values with units.  Likely, another data type would be required to support this.
> R1= 5 Ohm;
>
> I tried to use interval.  Maybe I'm not doing it right...
>
> R1int={100000-100000*(0.1),100000+100000(0.1)}
> R2int={30000-30000*(0.1),30000+30000(0.1)}
>
> (* Using interval (wrong answers) *)
> R1=Interval[R1int];
> R2=Interval[R2int];
> Vout=5/(R1+R2) R2 // Max
> Vout=5/(R1+R2) R2 // Min
>
> Out= 1.41026
> Out= 0.944056
>
> (* using table   (correct answers)    *)
> R1=R1int;
> R2=R2int;
> Table[5/(Ra+Rb) Rb,{Ra,R1},{Rb,R2}]// Max
> Table[5/(Ra+Rb) Rb,{Ra,R1},{Rb,R2}]// Min
>
> Out= 1.34146
> Out= 0.985401
>
> Table[] is actually getting me by.  The dimensional analysis would be very interesting, but again, we (I) get by without it.  The other engineers use dimensional analysis available in the other software.  It should be noted, it is quite limited in the other software.  Direct evaluation of relatively simple algebraic formula is supported, but it is clearly not supported by many functions.
>
> I have a mListFFT[] I've written.  I will post it in another thread for comments.  It is limited.  But works well enough for simple viewing of spectral content.
>
> Paul
>
> Paul McHale  |  Electrical Engineer, Energetics Systems  |  Excelitas Technologies Corp.
>
> Phone:   +1 937.865.3004   |   Fax:  +1 937.865.5170   |   Mobile:   +1 937.371.2828
> 1100 Vanguard Blvd, Miamisburg, Ohio 45342-0312 USA
> Paul.McH... at Excelitas.comwww.excelitas.com
>
> Please consider the environment before printing this e-mail.
> This email message and any attachments are confidential and proprietary to Excelitas Technologies Corp. If you are not the intended recipient of this message, please inform the sender by replying to this email or sending a message to the sender and destroy the message and any attachments.
> Thank you
>
> -----Original Message-----
> From: d... at wolfram.com [mailto:d... at wolfram.com]
> Sent: Saturday, March 03, 2012 6:53 AM
> Subject: Re: Engineering requests
>
> On Friday, March 2, 2012 6:49:55 AM UTC-6, McHale, Paul wrote:
> > So, here are some problems we face, but don't have great answers for in Mathematica.
>
> > 1. Dimensional analysis.  To do this, we must have unit support.  The best description of this is the ability to calculate (V/R)^2 R and have it return a unit of watts.  Other programs handily support this (though they are sorely lacking in other places :))
>
> Probably not exactly what you want, but you might have a look here.
>
> http://library.wolfram.com/infocenter/Conferences/7513/
>
> In:= minimalUnits[(v/o)^2*o]
> Out= {Watts}
>
> > 2. Tolerances support.  One difficulty we have is determining the min/max at a certain point in a circuit even if the circuit is not complicated to model.  I use lists {Rmax,Rmin} and Table.  Works, but is a little clumsy.
> > [...]
>
> Have you tried using Interval[...] to specify value ranges? For basic arithmetic this should offer some possibilities. If you are computing, say, solutions to differential equations with toleranced input values, that will be more of a challenge. In effect what one wants is some sensitivity analysis.  Can be done (using NDSolve), but is not so simple. That is to say, I do not recall the details of the setup.
>
> Daniel Lichtblau
> Wolfram Research

```

• Prev by Date: Re: irritating screen jumps in Mathematica 8.0.4
• Next by Date: Re: Engineering requests
• Previous by thread: Re: Engineering requests
• Next by thread: Re: Engineering requests