Month: May 2015

Impedance transformation

May 16, 2015 ece1229 No comments , , , ,

[Click here for a PDF of this post with nicer formatting]

In our final problem set we used the impedance transformation for calculations related to a microslot antenna. This transformation wasn’t familiar to me, and is apparently covered in the third year ECE fields class. I found a derivation of this in [1], but the idea is really simple and follows from the reflection coefficient calculation for a normal reflection configuration.

Consider a normal field reflection between two interfaces, as sketched in fig. 1.

normalTransmissionFig1

fig. 1. Normal reflection and transmission between two media.

The fields are

\begin{equation}\label{eqn:impedanceTransformation:40}
\BE^\textrm{i} = \xcap E_0 e^{-j k_1 z}
\end{equation}
\begin{equation}\label{eqn:impedanceTransformation:60}
\BH^\textrm{i} = \ycap \frac{E_0}{\eta_1} e^{-j k_1 z}
\end{equation}
\begin{equation}\label{eqn:impedanceTransformation:80}
\BE^\textrm{r} = \xcap \Gamma E_0 e^{j k_1 z}
\end{equation}
\begin{equation}\label{eqn:impedanceTransformation:100}
\BH^\textrm{r} = -\ycap \Gamma \frac{E_0}{\eta_1} e^{j k_1 z}
\end{equation}
\begin{equation}\label{eqn:impedanceTransformation:120}
\BE^\textrm{t} = \xcap E_0 T e^{-j k_2 z}
\end{equation}
\begin{equation}\label{eqn:impedanceTransformation:140}
\BH^\textrm{t} = \ycap \frac{E_0}{\eta_1} T e^{-j k_2 z}.
\end{equation}

The field orientations have been picked so that the tangential component of the electric field is \( \xcap \) oriented for all of the incident, reflected, and transmitted components. Requiring equality of the tangential field components at the interface gives

\begin{equation}\label{eqn:impedanceTransformation:180}
1 + \Gamma = T
\end{equation}
\begin{equation}\label{eqn:impedanceTransformation:200}
\inv{\eta_1} – \frac{\Gamma}{\eta_1} = \frac{T}{\eta_2}.
\end{equation}

Solving for the transmission coefficient gives

\begin{equation}\label{eqn:impedanceTransformation:220}
\begin{aligned}
T
&= \frac{2}{ 1 + \frac{\eta_1}{\eta_2} } \\
&= \frac{2 \eta_2}{ \eta_2 + \eta_1 },
\end{aligned}
\end{equation}

and for the reflection coefficient

\begin{equation}\label{eqn:impedanceTransformation:240}
\begin{aligned}
\Gamma
&= T – 1 \\
&= \frac{2 \eta_2 – \eta_1 – \eta_2}{ \eta_2 + \eta_1 } \\
&= \frac{\eta_2 – \eta_1 }{ \eta_2 + \eta_1 }.
\end{aligned}
\end{equation}

The total fields in medium 1 at the point \( z = -l \) are

\begin{equation}\label{eqn:impedanceTransformation:280}
\BE^\textrm{i} + \BE^\textrm{r}
=
\xcap E_0 \lr{ e^{ -j k_1 (-l)} + \Gamma e^{ j k_1 (-l) } }
\end{equation}
\begin{equation}\label{eqn:impedanceTransformation:300}
\BH^\textrm{i} + \BH^\textrm{r}
=
\ycap \frac{E_0}{\eta_1} \lr{ e^{ -j k_1 (-l)} – \Gamma e^{ j k_1 (-l) }}.
\end{equation}

The ratio of the electric field strength to the magnetic field strength is defined as the input impedance

\begin{equation}\label{eqn:impedanceTransformation:320}
Z_{\textrm{in}} \equiv \evalbar{\frac{E^\textrm{i} + E^\textrm{r}}{H^\textrm{i} + H^\textrm{r}}}{ z = -l}.
\end{equation}

That is

\begin{equation}\label{eqn:impedanceTransformation:340}
\begin{aligned}
Z_{\textrm{in}}
&=
\eta_1 \frac{
e^{ j k_1 l} + \Gamma e^{ -j k_1 l }
}{
e^{ j k_1 l} – \Gamma e^{ -j k_1 l }
} \\
&=
\eta_1 \frac{
\lr{ \eta_1 + \eta_2} e^{ j k_1 l} + \lr{ \eta_2 – \eta_1} e^{ -j k_1 l }
}{
\lr{ \eta_1 + \eta_2} e^{ j k_1 l} – \lr{ \eta_2 – \eta_1} e^{ -j k_1 l }
} \\
&=
\eta_1 \frac{
\eta_2 \cos( k_1 l ) + \eta_1 j \sin( k_1 l)
}{
\eta_2 j \sin( k_1 l ) + \eta_1 \cos( k_1 l)
},
\end{aligned}
\end{equation}

or
\begin{equation}\label{eqn:impedanceTransformation:360}
\boxed{
Z_{\textrm{in}}
=
\eta_1 \frac{
\eta_2 + j \eta_1 \tan( k_1 l)
}{
\eta_1 + j \eta_2 \tan( k_1 l )
}.
}
\end{equation}

References

[1] Constantine A Balanis. Advanced engineering electromagnetics, chapter {Reflection and transmission}. Wiley New York, 1989.

Canada’s ministry of homeland security

May 14, 2015 Incoherent ramblings No comments , , , ,

This last month, I’ve seen one name come up more than any others related to police-state actions and government overreach.  That name is Steven Blaney, the Minister of Public Safety.  He’s the one that sponsored bill C-51, he’s the one who has apparently attempting to arrange for US soldiers to police portions of Canada, and who has recently been caught proposing that groups that opt for BDS bans against Israeli-government actions be prosecuted under hate speech laws.  As Greenwald comments he and the government now both deny the latter.

So what is this Ministry of Public Safety?  That ministry is named in an Orwellian fashion, and contains a number of departments that have a large potential to abuse their power:

 

Basically, here under one roof is all the capability to spy on Canadians, restrict our rights, and then lock us up if we don’t comply.  It’s like the little sister of the United States Department of Homeland Security, with bits of the NSA and CIA tossed in.  The only thing missing is military power.  The total (declared) budget of this ministry is 6 billion dollars.  Compared to its United States counterparts this is an infinitesimal amount of operating cash, and they want more.

Understanding that “Minister of Public Safety” is a misnomer brings a lot of clarity when you consider that this politician is the one that tabled bill C-51.  Basically that bill is an attempt to grant the police state subset of the Canadian government, run by Blaney, more power.  It would be more accurate to have named this bill the “Please grant my Ministry more power” bill.  It now also makes sense how this bill appeared so quickly after the recent parliamentary shooting.  Blaney isn’t a lawyer, but a civil engineer by trade, so wouldn’t have written this himself.  I’d guess this was written by general-council in his ministry long before this shooting and was held in waiting for just this sort of perfect catalyzing event.  That is, of course, pure speculation.

Interesting news.

As a first look at this Ministry and its head, I did a bit of digging, and found a couple of interesting articles

 

The first and second are excellent examples of just the sort of overreach and abuse of power that people are concerned that Bill C-51 would allow.  The only disclaimer is that these are events that have already occurred.

This ministry is indirectly responsible for gun controls, the subject of that last article.  I don’t know a thing about guns nor that specific Swiss weapon, but am completely unsurprised that a politician has been caught playing the game of saying things in the press contrary to reality.

Bills tabled by Blaney

What else is the Ministry of Public Safety up to.  Here’s a list of bills tabled by their figurehead:

An Act to amend the Criminal Records Act, the Corrections and Conditional Release Act, the Immigration and Refugee Protection Act and the International Transfer of Offenders Act

An Act to amend the Corrections and Conditional Release Act and to make a consequential amendment to the International Transfer of Offenders Act

An Act to enact the Security of Canada Information Sharing Act and the Secure Air Travel Act, to amend the Criminal Code, the Canadian Security Intelligence Service Act and the Immigration and Refugee Protection Act and to make related and consequential amendments to other Acts

An Act to amend the Canadian Security Intelligence Service Act and other Acts

An Act to amend the Firearms Act and the Criminal Code and to make a related amendment and a consequential amendment to other Acts

An Act to amend the Corrections and Conditional Release Act

 

This ministry has been busy.

 

Letter to parliament (John McCallum), thank you for your positive Bill C-51 vote.

May 11, 2015 Incoherent ramblings No comments , , , ,

 

From: <me, address, date>

Cc: peeterjoot.com/

 

 

To:

The Honourable John McCallum,

House of Commons

Ottawa, Ontario

Canada

K1A 0A6

 

The Honourable John McCallum,

 

I see at https://openparliament.ca/votes/41-2/395/ that you voted for bill C-51.  I asked for this in my letter dated April 15, 2015.  However, I thought I should now point out that my original letter was intended to be satire.

Satire has been used historically for political commentary.  This was true for example of Orwell’s “Animal Farm” and “1984”.  Given your vote on bill C-51, it seems clear that the intent of the book “1984” was not clear.  This book was supposed to point out many dangerous trends in society of the time.  It was not supposed to be a manual.

I do not know if your vote for C-51 was due to a belief that this was what your constituents wanted this.  Perhaps you were looking at biased or old polls that indicated this was true?  There would have been a time when the media hype for the parliamentary shootings would have gotten just this sort of reactionary support.  However, once people started behaving rationally again, support for increased police state actions against Canadian citizens should have been a hard sell.

Perhaps you voted for this because you felt obligated to?  Your political party requires consensus views and actions.  For reasons that I’ll never understand, the current figurehead of your political party mandated that you would not be able to vote your own view, let alone the views of your constituents.  I really can’t imagine how you can tolerate being part of such a system.  Did you realize that once elected you would be powerless, and not be given the opportunity to vote for your own views?

How a system where party consensus is required can be called democracy is beyond my understanding.  Perhaps this is because I have a 12-year old mentality.  When I took civics for the first time back in junior school, this concept was just as insane.  Perhaps I am the childish insane one to think that the forces that truly govern behind the curtain would allow things to be any other way.

You as a member of parliament, and I as a citizen of Canada, both know how much of a farce democracy in Canada is.  Once every few years the “people” get to exercise their “free will” electing a representative.  Even if our chosen representative is elected, as many as 49% percent (assuming the ideal of all voting) will be unrepresented.  Those who do get their selection of “representative” are probably compromising on a number of issues, and are really crossing their fingers hoping not to be screwed by the power elite.  Even assuming our representative makes it into their figurehead position, you have no more power to actually represent us than a stick floating upstream.  You have to fight the entrenched bureaucracy of the Federal government, surely an unmovable force.  For that I give you my deepest condolences.

It is my expectation that this positive C-51 vote is going to backfire strongly on both the Conservative and Liberal parties.  Canadians have been shown by the actions of both that they are indistinguishable.  For those that still believe in the concept of modern democracy, you will likely find that this will increase voter apathy.  This bill is just more of the same old crap.  The government is once again voting to give themselves more power.  If that is why you voted for this I guess it makes sense.  It’s sad and demoralizing, but it makes sense.  In essence a positive vote is like a positive vote for a pay raise for government.  Unfortunately, we all have to pay for that raise.  We all have to pay for our own enslavement.  This will probably mean that an NDP Federal figurehead will lead the next round of the show come election times.  I don’t personally believe that it will make any difference.  It may make a difference to you, since you might be forced to get a different job.

Presuming that you did read this or my previous correspondence, I doubt there is anything that you can say that will fight off the feelings of complete betrayal.  I doubt there is anything that you can write that would inspire non-existent believe in Canadian democracy.  I write this as if you will actually read what I say.  I don’t know if that is the case.  Perhaps I am corresponding again with Mr. Nicholson from your office?

Even if you do read this, and even if you do respond, I doubt there is any sort of justification that you can make that I will judge to be in good faith and to be well reasoned.  This is why people don’t want to know what our “leadership” is doing in our names, and do not want to be involved in the Canadian system of government.  It is too depressing to know come face to face with just how pointless and hopeless it is.  Thanks to your vote on bill C-51, perhaps I’ll go back to ignoring what I can’t change, and let myself and my kids become ever more enslaved.

 

Sincerely,

 

 

 

Peeter Joot

Debugging with optimization: -g8

May 8, 2015 C/C++ development and debugging. No comments , , , , ,

It was suggested to me to try -g8 for debugging some optimized code (xlC compiler, linuxppcle platform).  Turns out that there is a whole set of -gN options with the xlC compiler that allow various levels of debug instrumentation.

For the optimization bug that I was debugging, -g8 made the problem go away, but with -g5 I was able to break at the nearest case: block and determine that the data in the variables was good coming into that case statement.  Since what appears to come out of that case statement is bad, this isolates the problem significantly.

Hacking header file timestamps

May 7, 2015 C/C++ development and debugging. No comments , , ,

Suppose you change a header foo.h, but your build system has dependency checking that will force the world to be rebuilt. A handy way to avoid that is with judicious use of the touch command, such as:

touch -t197301010000 foo.h 

or (on Linux)

touch --reference another-file-that-is-early-enough-in-time foo.h

Both of these can be used to force the modification time for the file backwards.

This can be very useful way to save time.

It is also a great way to not build enough or break the build if misused!

I’d recommend this only for prototyping type work, to be followed up with a subsequent touch to restore the timestamps to normal, and then do a proper build.

Plane wave solution directly from Maxwell’s equations

May 6, 2015 math and physics play No comments , , , ,

[Click here for a PDF of this post with nicer formatting]

Here’s a problem that I thought was fun, an exercise for the reader to show that the plane wave solution to Maxwell’s equations can be found with ease directly from Maxwell’s equations. This is in contrast to the what seems like the usual method of first showing that Maxwell’s equations imply wave equations for the fields, and then solving those wave equations.

Problem. \( \xcap \) oriented plane wave electric field ([1] ex. 4.1)

A uniform plane wave having only an \( x \) component of the electric field is traveling in the \( + z \) direction in an unbounded lossless, source-0free region. Using Maxwell’s equations write expressions for the electric and corresponding magnetic field intensities.

Answer

The phasor form of Maxwell’s equations for a source free region are

\begin{equation}\label{eqn:ExPlaneWave:40}
\spacegrad \cross \BE = -j \omega \BB
\end{equation}
\begin{equation}\label{eqn:ExPlaneWave:60}
\spacegrad \cross \BH = j \omega \BD
\end{equation}
\begin{equation}\label{eqn:ExPlaneWave:80}
\spacegrad \cdot \BD = 0
\end{equation}
\begin{equation}\label{eqn:ExPlaneWave:100}
\spacegrad \cdot \BB = 0.
\end{equation}

Since \( \BE = \xcap E(z) \), the magnetic field follows from \ref{eqn:ExPlaneWave:40}

\begin{equation}\label{eqn:ExPlaneWave:120}
-j \omega \BB
= \spacegrad \cross \BE
=
\begin{vmatrix}
\xcap & \ycap & \zcap \\
\partial_x & \partial_y & \partial_z \\
E & 0 & 0
\end{vmatrix}
=
\ycap \partial_z E(z)
– \zcap \partial_y E(z),
\end{equation}

or

\begin{equation}\label{eqn:ExPlaneWave:140}
\BB =
-\inv{j \omega} \partial_z E.
\end{equation}

This is constrained by \ref{eqn:ExPlaneWave:60}

\begin{equation}\label{eqn:ExPlaneWave:160}
j \omega \epsilon \xcap E
=
\inv{\mu} \spacegrad \cross \BB
=
-\inv{\mu j \omega}
\begin{vmatrix}
\xcap & \ycap & \zcap \\
\partial_x & \partial_y & \partial_z \\
0 & \partial_z E & 0
\end{vmatrix}
=
-\inv{\mu j \omega}
\lr{
-\xcap \partial_{z z} E
+ \zcap \partial_x \partial_z E
}
\end{equation}

Since \( \partial_x \partial_z E = \partial_z \lr{ \partial_x E } = \partial_z \inv{\epsilon} \spacegrad \cdot \BD = \partial_z 0 \), this means

\begin{equation}\label{eqn:ExPlaneWave:180}
\partial_{zz} E = -\omega^2 \epsilon\mu E = -k^2 E.
\end{equation}

This is the usual starting place that we use to show that the plane wave has an exponential form

\begin{equation}\label{eqn:ExPlaneWave:200}
\BE(z) =
\xcap
\lr{
E_{+} e^{-j k z}
+
E_{-} e^{j k z}
}.
\end{equation}

The magnetic field from \ref{eqn:ExPlaneWave:140} is

\begin{equation}\label{eqn:ExPlaneWave:220}
\BB
= \frac{j}{\omega} \lr{ -j k E_{+} e^{-j k z} + j k E_{-} e^{j k z} }
= \inv{c} \lr{ E_{+} e^{-j k z} – E_{-} e^{j k z} },
\end{equation}

or

\begin{equation}\label{eqn:ExPlaneWave:240}
\BH
= \inv{\mu c} \lr{ E_{+} e^{-j k z} – E_{-} e^{j k z} }
= \inv{\eta} \lr{ E_{+} e^{-j k z} – E_{-} e^{j k z} }.
\end{equation}

A solution requires zero divergence for the magnetic field, but that can be seen to be the case by inspection.

References

[1] Constantine A Balanis. Advanced engineering electromagnetics. Wiley New York, 1989.

Coupled wave equation in cylindrical coordinates

May 5, 2015 math and physics play No comments , ,

[Click here for a PDF of this post with nicer formatting]

In [1], for a sourceless configuration, it is noted that the electric field equations \( \spacegrad^2 \BE = -\beta^2 \BE \) have the form

\begin{equation}\label{eqn:cylindricalFieldSolution:20}
\spacegrad^2 E_\rho – \frac{E_\rho}{\rho^2} – \frac{2}{\rho^2} \PD{\phi}{E_\phi} = -\beta^2 E_\rho
\end{equation}
\begin{equation}\label{eqn:cylindricalFieldSolution:60}
\spacegrad^2 E_\phi – \frac{E_\phi}{\rho^2} + \frac{2}{\rho^2} \PD{\phi}{E_\rho} = -\beta^2 E_\phi
\end{equation}
\begin{equation}\label{eqn:cylindricalFieldSolution:80}
\spacegrad^2 E_z = -\beta^2 E_z,
\end{equation}

where

\begin{equation}\label{eqn:cylindricalFieldSolution:100}
\spacegrad^2 \psi =
\inv{\rho} \PD{\rho}{} \lr{ \rho \PD{\rho}{\psi}} + \inv{\rho^2}\PDSq{\phi}{\psi} + \PDSq{z}{\psi}.
\end{equation}

He applies separation of variables to the last equation, ending up with the usual Bessel function solution, but the first two coupled equations are dismissed as coupled and difficult. It looks like separation of variables works for this too, but we have to prep the system slightly by writing \( \psi = E_\rho + j E_\phi \), which gives

\begin{equation}\label{eqn:cylindricalFieldSolution:120}
\spacegrad^2 \psi – \frac{\psi}{\rho^2} + \frac{2 j}{\rho^2} \PD{\phi}{\psi} = -\beta^2 \psi,
\end{equation}

or

\begin{equation}\label{eqn:cylindricalFieldSolution:140}
\inv{\rho} \PD{\rho}{} \lr{ \rho \PD{\rho}{\psi}} + \inv{\rho^2}\PDSq{\phi}{\psi} + \PDSq{z}{\psi}
– \frac{\psi}{\rho^2} + \frac{2 j}{\rho^2} \PD{\phi}{\psi} = -\beta^2 \psi.
\end{equation}

With a separation of variables substitution \( \psi = f(\rho) g(\phi) h(z) \) this gives

\begin{equation}\label{eqn:cylindricalFieldSolution:160}
\inv{\rho f} \PD{\rho}{} \lr{ \rho \PD{\rho}{f}}
+ \inv{\rho^2 g}\PDSq{\phi}{g}
+ \inv{z} \PDSq{z}{h}
– \frac{1}{\rho^2} + \frac{2 j}{\rho^2 g} \PD{\phi}{g} = -\beta^2.
\end{equation}

Assuming a solution for the function \( h \) of

\begin{equation}\label{eqn:cylindricalFieldSolution:180}
\inv{z} \PDSq{z}{h} = -\alpha^2,
\end{equation}

the PDE is reduced to an equation in two functions

\begin{equation}\label{eqn:cylindricalFieldSolution:200}
\inv{\rho f} \PD{\rho}{} \lr{ \rho \PD{\rho}{f}}
+ \inv{\rho^2 g}\PD{\phi}{} \lr{ g + 2 j g}
+ \beta^2 -\alpha^2
– \frac{1}{\rho^2}
= 0,
\end{equation}

or

\begin{equation}\label{eqn:cylindricalFieldSolution:220}
\frac{\rho}{f} \PD{\rho}{} \lr{ \rho \PD{\rho}{f}}
+ \inv{g}\PD{\phi}{} \lr{ g + 2 j g}
+ \lr{ \beta^2 -\alpha^2 }\rho^2
= 1.
\end{equation}

With the term in \( g \) having only \( \phi \) dependence, we can assume

\begin{equation}\label{eqn:cylindricalFieldSolution:240}
\inv{g}\PD{\phi}{} \lr{ g + 2 j g} = 1 – \gamma^2,
\end{equation}

for

\begin{equation}\label{eqn:cylindricalFieldSolution:260}
\frac{\rho}{f} \PD{\rho}{} \lr{ \rho \PD{\rho}{f}}
– \gamma^2
+ \lr{ \beta^2 -\alpha^2 }\rho^2
= 0.
\end{equation}

I’m not sure off hand if these can be solved in known special functions, especially since the constants in the mix are complex.

References

[1] Constantine A Balanis. Advanced engineering electromagnetics, volume 20. Wiley New York, 1989.

Tangential and normal field components

May 4, 2015 ece1229 No comments , , , , , , , , , , , , ,

[Click here for a PDF of this post with nicer formatting]

The integral forms of Maxwell’s equations can be used to derive relations for the tangential and normal field components to the sources. These relations were mentioned in class. It’s a little late, but lets go over the derivation. This isn’t all review from first year electromagnetism since we are now using a magnetic source modifications of Maxwell’s equations.

The derivation below follows that of [1] closely, but I am trying it myself to ensure that I understand the assumptions.

The two infinitesimally thin pillboxes of fig. 1, and fig. 2 are used in the argument.

pillboxForTangentialFieldsFig1

fig. 2: Pillboxes for tangential and normal field relations

pillboxForNormalFieldsFig2

fig. 1: Pillboxes for tangential and normal field relations

Maxwell’s equations with both magnetic and electric sources are

\begin{equation}\label{eqn:normalAndTangentialFields:20}
\spacegrad \cross \boldsymbol{\mathcal{E}} = -\PD{t}{\boldsymbol{\mathcal{B}}} -\boldsymbol{\mathcal{M}}
\end{equation}
\begin{equation}\label{eqn:normalAndTangentialFields:40}
\spacegrad \cross \boldsymbol{\mathcal{H}} = \boldsymbol{\mathcal{J}} + \PD{t}{\boldsymbol{\mathcal{D}}}
\end{equation}
\begin{equation}\label{eqn:normalAndTangentialFields:60}
\spacegrad \cdot \boldsymbol{\mathcal{D}} = \rho_\textrm{e}
\end{equation}
\begin{equation}\label{eqn:normalAndTangentialFields:80}
\spacegrad \cdot \boldsymbol{\mathcal{B}} = \rho_\textrm{m}.
\end{equation}

After application of Stokes’ and the divergence theorems Maxwell’s equations have the integral form

\begin{equation}\label{eqn:normalAndTangentialFields:100}
\oint \boldsymbol{\mathcal{E}} \cdot d\Bl = -\int d\BA \cdot \lr{ \PD{t}{\boldsymbol{\mathcal{B}}} + \boldsymbol{\mathcal{M}} }
\end{equation}
\begin{equation}\label{eqn:normalAndTangentialFields:120}
\oint \boldsymbol{\mathcal{H}} \cdot d\Bl = \int d\BA \cdot \lr{ \PD{t}{\boldsymbol{\mathcal{D}}} + \boldsymbol{\mathcal{J}} }
\end{equation}
\begin{equation}\label{eqn:normalAndTangentialFields:140}
\int_{\partial V} \boldsymbol{\mathcal{D}} \cdot d\BA
=
\int_V \rho_\textrm{e}\,dV
\end{equation}
\begin{equation}\label{eqn:normalAndTangentialFields:160}
\int_{\partial V} \boldsymbol{\mathcal{B}} \cdot d\BA
=
\int_V \rho_\textrm{m}\,dV.
\end{equation}

Maxwell-Faraday equation

First consider one of the loop integrals, like \ref{eqn:normalAndTangentialFields:100}. For an infinestismal loop, that integral is

\begin{equation}\label{eqn:normalAndTangentialFields:180}
\begin{aligned}
\oint \boldsymbol{\mathcal{E}} \cdot d\Bl
&\approx
\mathcal{E}^{(1)}_x \Delta x
+ \mathcal{E}^{(1)} \frac{\Delta y}{2}
+ \mathcal{E}^{(2)} \frac{\Delta y}{2}
-\mathcal{E}^{(2)}_x \Delta x
– \mathcal{E}^{(2)} \frac{\Delta y}{2}
– \mathcal{E}^{(1)} \frac{\Delta y}{2} \\
&\approx
\lr{ \mathcal{E}^{(1)}_x
-\mathcal{E}^{(2)}_x } \Delta x
+ \inv{2} \PD{x}{\mathcal{E}^{(2)}} \Delta x \Delta y
+ \inv{2} \PD{x}{\mathcal{E}^{(1)}} \Delta x \Delta y.
\end{aligned}
\end{equation}

We let \( \Delta y \rightarrow 0 \) which kills off all but the first difference term.

The RHS of \ref{eqn:normalAndTangentialFields:180} is approximately

\begin{equation}\label{eqn:normalAndTangentialFields:200}
-\int d\BA \cdot \lr{ \PD{t}{\boldsymbol{\mathcal{B}}} + \boldsymbol{\mathcal{M}} }
\approx
– \Delta x \Delta y \lr{ \PD{t}{\mathcal{B}_z} + \mathcal{M}_z }.
\end{equation}

If the magnetic field contribution is assumed to be small in comparison to the magnetic current (i.e. infinite magnetic conductance), and if a linear magnetic current source of the form is also assumed

\begin{equation}\label{eqn:normalAndTangentialFields:220}
\boldsymbol{\mathcal{M}}_s = \lim_{\Delta y \rightarrow 0} \lr{\boldsymbol{\mathcal{M}} \cdot \zcap} \zcap \Delta y,
\end{equation}

then the Maxwell-Faraday equation takes the form

\begin{equation}\label{eqn:normalAndTangentialFields:240}
\lr{ \mathcal{E}^{(1)}_x
-\mathcal{E}^{(2)}_x } \Delta x
\approx
– \Delta x \boldsymbol{\mathcal{M}}_s \cdot \zcap.
\end{equation}

While \( \boldsymbol{\mathcal{M}} \) may have components that are not normal to the interface, the surface current need only have a normal component, since only that component contributes to the surface integral.

The coordinate expression of \ref{eqn:normalAndTangentialFields:240} can be written as

\begin{equation}\label{eqn:normalAndTangentialFields:260}
– \boldsymbol{\mathcal{M}}_s \cdot \zcap
=
\lr{ \boldsymbol{\mathcal{E}}^{(1)} -\boldsymbol{\mathcal{E}}^{(2)} } \cdot \lr{ \ycap \cross \zcap }
=
\lr{ \lr{ \boldsymbol{\mathcal{E}}^{(1)} -\boldsymbol{\mathcal{E}}^{(2)} } \cross \ycap } \cdot \zcap.
\end{equation}

This is satisfied when

\begin{equation}\label{eqn:normalAndTangentialFields:280}
\boxed{
\lr{ \boldsymbol{\mathcal{E}}^{(1)} -\boldsymbol{\mathcal{E}}^{(2)} } \cross \ncap = – \boldsymbol{\mathcal{M}}_s,
}
\end{equation}

where \( \ncap \) is the normal between the interfaces. I’d failed to understand when reading this derivation initially, how the \( \boldsymbol{\mathcal{B}} \) contribution was killed off. i.e. If the vanishing area in the surface integral kills off the \( \boldsymbol{\mathcal{B}} \) contribution, why do we have a \( \boldsymbol{\mathcal{M}} \) contribution left. The key to this is understanding that this magnetic current is considered to be confined very closely to the surface getting larger as \( \Delta y \) gets smaller.

Also note that the units of \( \boldsymbol{\mathcal{M}}_s \) are volts/meter like the electric field (not volts/squared-meter like \( \boldsymbol{\mathcal{M}} \).)

Ampere’s law

As above, assume a linear electric surface current density of the form

\begin{equation}\label{eqn:normalAndTangentialFields:300}
\boldsymbol{\mathcal{J}}_s = \lim_{\Delta y \rightarrow 0} \lr{\boldsymbol{\mathcal{J}} \cdot \ncap} \ncap \Delta y,
\end{equation}

in units of amperes/meter (not amperes/meter-squared like \( \boldsymbol{\mathcal{J}} \).)

To apply the arguments above to Ampere’s law, only the sign needs to be adjusted

\begin{equation}\label{eqn:normalAndTangentialFields:290}
\boxed{
\lr{ \boldsymbol{\mathcal{H}}^{(1)} -\boldsymbol{\mathcal{H}}^{(2)} } \cross \ncap = \boldsymbol{\mathcal{J}}_s.
}
\end{equation}

Gauss’s law

Using the cylindrical pillbox surface with radius \( \Delta r \), height \( \Delta y \), and top and bottom surface areas \( \Delta A = \pi \lr{\Delta r}^2 \), the LHS of Gauss’s law \ref{eqn:normalAndTangentialFields:140} expands to

\begin{equation}\label{eqn:normalAndTangentialFields:320}
\begin{aligned}
\int_{\partial V} \boldsymbol{\mathcal{D}} \cdot d\BA
&\approx
\mathcal{D}^{(2)}_y \Delta A
+ \mathcal{D}^{(2)}_\rho 2 \pi \Delta r \frac{\Delta y}{2}
+ \mathcal{D}^{(1)}_\rho 2 \pi \Delta r \frac{\Delta y}{2}
-\mathcal{D}^{(1)}_y \Delta A \\
&\approx
\lr{ \mathcal{D}^{(2)}_y
-\mathcal{D}^{(1)}_y } \Delta A.
\end{aligned}
\end{equation}

As with the Stokes integrals above it is assumed that the height is infinestimal with respect to the radial dimension. Letting that height \( \Delta y \rightarrow 0 \) kills off the radially directed contributions of the flux through the sidewalls.

The RHS expands to approximately

\begin{equation}\label{eqn:normalAndTangentialFields:340}
\int_V \rho_\textrm{e}\,dV
\approx
\Delta A \Delta y \rho_\textrm{e}.
\end{equation}

Define a highly localized surface current density (coulombs/meter-squared) as

\begin{equation}\label{eqn:normalAndTangentialFields:360}
\sigma_\textrm{e} = \lim_{\Delta y \rightarrow 0} \Delta y \rho_\textrm{e}.
\end{equation}

Equating \ref{eqn:normalAndTangentialFields:340} with \ref{eqn:normalAndTangentialFields:320} gives

\begin{equation}\label{eqn:normalAndTangentialFields:380}
\lr{ \mathcal{D}^{(2)}_y
-\mathcal{D}^{(1)}_y } \Delta A
=
\Delta A \sigma_\textrm{e},
\end{equation}

or

\begin{equation}\label{eqn:normalAndTangentialFields:400}
\boxed{
\lr{ \boldsymbol{\mathcal{D}}^{(2)} – \boldsymbol{\mathcal{D}}^{(1)} } \cdot \ncap = \sigma_\textrm{e}.
}
\end{equation}

Gauss’s law for magnetism

The same argument can be applied to the magnetic flux. Define a highly localized magnetic surface current density (webers/meter-squared) as

\begin{equation}\label{eqn:normalAndTangentialFields:440}
\sigma_\textrm{m} = \lim_{\Delta y \rightarrow 0} \Delta y \rho_\textrm{m},
\end{equation}

yielding the boundary relation

\begin{equation}\label{eqn:normalAndTangentialFields:420}
\boxed{
\lr{ \boldsymbol{\mathcal{B}}^{(2)} – \boldsymbol{\mathcal{B}}^{(1)} } \cdot \ncap = \sigma_\textrm{m}.
}
\end{equation}

References

[1] Constantine A Balanis. Advanced engineering electromagnetics, volume 20, chapter Time-varying and time-harmonic electromagnetic fields. Wiley New York, 1989.

Shipping with UPS from US to Canada. Prepare to be screwed.

May 3, 2015 Incoherent ramblings 4 comments , , ,

UPS has a nice little scam rigged up with COD fees for customs handling.  Check out this bill:

 

For reasons unknown, Canada customs decided that I should have to pay 11 cents on items I’d been sent after loaning them to a US resident.

Observe that because UPS paid that 11 cents fee at the border, they tacked on their own $30 brokerage fee (plus GST).

I can’t imagine that this is legal.  If it is legal, I’d recommend people boycott UPS as a shipping company when sending from the USA to Canada.  They basically have found a way to double charge for the package, once explicitly to the sender, and once to the receiver.  However, this isn’t the first time I’ve been charged handling fees of this sort.  I think the previous time it was FedEx, and they charged something like $15-$20 for paying a couple dollar customs fee.

If all the big shipping companies are playing this sort of dirty game, there are not many possibilities for boycotting them.  I’d not be surprised at all if somebody in Canada customs management is getting a kickback from UPS and friends to facilitate addition of trivial fees that these companies can use to justify their brokerage fees.