3.016 Problem Set #5, 2010

I5-1

Input the matrix

theMat = {{1,4,-2},{4,1,2},{-2,2,-2}};
theMat//MatrixForm

Set the two rotations:

rotationX = RotationMatrix[θ,{1,0,0}];
rotationZ = RotationMatrix[θ,{0,0,1}];

rotNegX= RotationMatrix[-θ,{1,0,0}];
rotNegZ= RotationMatrix[-θ,{0,0,1}];

The rotation matrix for first rotating θ around x-axis, and then rotating θ around z-axis:

rotMat1 = Simplify[Inverse[rotationZ].Inverse[rotationX].theMat.rotationX.rotationZ,Assumptions-> 0≤ θ ≤ 2Pi];
rotMat1//MatrixForm

The rotation matrix for first rotating θ around z-axis, and then rotating θ around x-axis:

rotMat2 = Simplify[Inverse[rotationX].Inverse[rotationZ].theMat.rotationZ.rotationX,Assumptions-> 0≤ θ ≤ 2Pi];
rotMat2//MatrixForm

Note that the matrices are not the same----the two rotations do not commute!

Now getting the eigenvalues:

The eigenvalues for the original matrix:

eigsys = Eigensystem[theMat]

The eigenvalues for the first rotation matrix:

Simplify[Eigensystem[rotMat1],Assumptions-> 0≤ θ ≤ 2Pi]

The eigenvalues for the second rotation matrix:

Simplify[Eigensystem[rotMat2],Assumptions-> 0≤ θ ≤ 2Pi]

The eigenvalues are invarient with respect to the coordinate transformation, but the eigenvectors depend on direction. A good exercise would be to rotate the rotated eigenvectors back into the original frame.

I5-2

Here is the function that normalizes the vector and draws a colored circle:

rgbCircle[{r_?NumberQ, g_?NumberQ, b_?NumberQ}] :=Module[
{ rs,bs,gs},
{rs,gs,bs} = Normalize[{r,g,b}];
 Graphics[{RGBColor[rs,gs,bs],Disk[]}]
]

Plot some examples using the above function:

GraphicsArray[{{rgbCircle[{1,2,3}],rgbCircle[{2,3,1}]},{rgbCircle[{2,3,2}],rgbCircle[{2,4,6}]}}]

The matrix and its inverse...

rgbTopoc = {
{1/2,0,1/2},
{1/2,1/2,0},
{0,1/2,1/2}
};
rgbTopoc//MatrixForm

Det[rgbTopoc]

Since the determinant is not 1, the tranformation matrix rgbTopoc will change the vector's magnitude to 1/4 of the original size.

pocTorgb = Inverse[rgbTopoc]

pocTorgb//MatrixForm

Det[pocTorgb]

Since the determinant is not 1, the tranformation matrix pocTorgb will change the vector's magnitude to 4 times the original size.

Obtain the eigenvalues:

Eigensystem[rgbTopoc]

There is only one real eigenvalue, and that corresponds to gray---gray is the eigenvector for this color transformation:

pocCircle[{p_,o_,c_}] := rgbCircle[pocTorgb.{p,o,c}]

GraphicsRow[{rgbCircle[{1,1,1}],pocCircle[{1,1,1}]}]

I5 - 3

Normalizing Z by R:

Znorm = 1/(1 + Sqrt[-1] Resistance Capacity ω)

An example Nyquist plot for Capacity × Resistance = 1

ParametricPlot[{Re[Znorm/.Resistance Capacity-> 1],-Im[Znorm/.{Resistance Capacity-> 1} ]},{ω,0,1000},PlotRange-> All,PlotPoints-> 200,AxesLabel-> {"Re[Z/R]}","-Im[Z/R]"}]

The Nyquist Plot is a half circle, the distance from zero to each point is the impedence.  However, it is hard to tell how this impedence depends on frequency, one way to improve this will be using the color to distinguish different frequencies (note that in the plot below Capacity × Resistance = 0.01 is used so that different colors show better in the figure):

ParametricPlot[{Re[Znorm/.Resistance Capacity-> .01],-Im[Znorm/.{Resistance Capacity-> .01} ]},{ω,0,1000},PlotRange-> All,PlotPoints-> 200,ColorFunction-> ( Hue[0.666 #3/1000]&),ColorFunctionScaling-> False,AxesLabel-> {"Re[Z/R]}","-Im[Z/R]"},PlotLabel-> "Nyquist Plot with Color Coded Frequencies\nFrequencies Interpolate from Red=0 to Blue=∞"]

To see how this plot changes for different values of  Capacity × Resistance , we could use a Table inside the ParametricPlot, but here it is useful to use a Manipulate function:

Manipulate[
ParametricPlot[{Re[(Resistance Znorm)],-Im[(Resistance Znorm) ]}/.{Resistance-> r, Capacity-> c},{ω,0,1000},PlotRange-> All,PlotPoints-> 200,MaxRecursion->15,ColorFunction-> ( Hue[0.666 #3/1000]&),ColorFunctionScaling-> False,AxesLabel-> {"Re[Z]}","-Im[Z]"},PlotLabel-> "Nyquist Plot with Color Coded Frequencies\nFrequencies Interpolate from Red=0 to Blue=∞",AspectRatio-> 1,PlotRange-> All],
{{r,1,"Resistance"},0,10},
{{c,.01,"Capacitance"},0.001,.4}
]

The shape of the plot remains the same, the imaginary and real parts scale with the Resistance---the frequency dependence changes with the pair R C.