kill(all)$

electro(chem) , measurement with bridgge ' Weathstone Bridge',part 1:version 1.0
peter.vlasschaert@gmail.com,09/01/2020

info : see Electrical : website KVL,KCL ,other realation between (R,L,C).

load packages :
============

load(lrats)$

simple relations of impedance : u,i 

complex numbers
==============

representation : complex plane from gauss
=================================
imaginary axis : y -axis
real             axis : x-axis

j : %i;

p1:Z= a+j*b;

Z = general representation : complex number
a = Realpart(Z)         , impedance : 'see below', a > 0 , 'resistor = R'
b = Imaginarypart(Z) ,b : real number

p1a:'realpart(Z) = realpart(rhs(p1));
p1b:'imagpart(Z) =imagpart(rhs(p1));

example 1: serial impedance coil & resistor
----------------------------------------------------------
Z = impedance

p2:Z = R+j*XL;

p2a:a=realpart(rhs(p2));
p2b:b=imagpart(rhs(p2));

example : a>=0,b>=0

example 2:serial impedance coil & resistor & capacitor
----------------------------------------------------------------------------
Z = impedance

p3:Z = R+j*XL+1/(j*XC);

p3a:a=realpart(rhs(p3));
p3b:b=imagpart(rhs(p3));

Euler identity
==========

p3a1:exp(j*θ) ;

p3a2:demoivre(%);

p3a3:p3a1 = p3a2;

simple  impedance
===============

a) resistor 
---------------
R ( = Ohm),unit::Ω

p4a:Z =R;

current(=i), voltage(=u)
=================

p4b:u=i*rhs(p4a);
p4c:solve(p4b,i)[1];

relation : 'p4b,p4c' : Law of Ohm

b) coil  (complex part Z,p3)
---------------
L'= inductance', ( = Henry),unit::H

p5a:Z= part(rhs(p3),1);

rem : XL = ω*L = 2*π*f*L
f : frequency

current(=i), voltage(=u)
=================
u = ref,  i = ?

phase :between(u,i) =φL

1e) use 'p4c',replace R => rhs(p5a)

p5b: lhs(p4c) =subst([R=rhs(p5a)],rhs(p4c));

i below u with φL=π/2
rem :  i =negativ part y -axis (= imaginary)
          u  =positiv part  x -axis (=real)

2e) replace XL = 2*π*f*L

p5c:subst([XL = 2*π*f*L],p5b);

3e) how to find angle :φL

assume(L>0,f>0,u>0);

p5d:lhs(p5c) = polarform(rhs(p5c));

use :p3a3

p5d1:'subst([θ=-π/2],lhs(p3a3) )=subst([θ=-π/2],rhs(p3a3));

see :p5d,rhs

b) capacitor  (complex part Z,p3)
---------------
L'= capacitance', ( = Farad),unit::F

p6a:Z= part(rhs(p3),2);

rem : XC = ω*C = 2*π*f*C
f : frequency

current(=i), voltage(=u)
=================
u = ref,  i = ?

phase :between(u,i) =φC

1e) use 'p4c',replace R => rhs(p6a)

p6b:lhs(p4c) =subst([R=rhs(p6a)],rhs(p4c));

i above u with φL=π/2
rem :  i = positiv part y -axis (= imaginary)
          u  =positiv part  x -axis (=real)

2e) replace XC = 2*π*f*C

p6c:subst([XC = 2*π*f*C],p6b);

3e) how to find angle :φC

assume(C>0,f>0,u>0);

p6d:lhs(p6c) =polarform(rhs(p6c));

use :p3a3

p6d1:'subst([θ=π/2],lhs(p3a3) )=subst([θ=π/2],rhs(p3a3));

see :p6d ,rhs

rem : redundant be already assumed above.

use euler identity
=============
exp(i*θ) =cos(θ)+i*sin(θ)

rem: %i  = pos y axis complex plane (angle = π/2),ref :real axis
        -%i = neg  x axis complex plane (angle = π/2),ref :real axis