(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 11.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 15437, 378] NotebookOptionsPosition[ 14672, 356] NotebookOutlinePosition[ 15032, 372] CellTagsIndexPosition[ 14989, 369] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(*", RowBox[{ "This", " ", "code", " ", "plots", " ", "the", " ", "amplitude", " ", "of", " ", "voltage", " ", "and", " ", "current", " ", "along", " ", "a", " ", "transmission", " ", "line", " ", "terminated", " ", "by", " ", "an", " ", "arbitrary", " ", "impedance"}], "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"V", "=", RowBox[{ RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "2", "\[Pi]", " ", "z"}]], RowBox[{"(", RowBox[{"1", "+", "\[CapitalGamma]"}], ")"}]}], "//.", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalGamma]", "\[Rule]", " ", RowBox[{"\[CapitalGamma]L", " ", SuperscriptBox["\[ExponentialE]", RowBox[{"2", "\[ImaginaryI]", " ", "2", "\[Pi]", " ", "z"}]]}]}], ",", " ", RowBox[{"\[CapitalGamma]L", "\[Rule]", FractionBox[ RowBox[{"ZL", "-", "Z0"}], RowBox[{"ZL", "+", "Z0"}]]}], " ", ",", " ", RowBox[{"Z0", "\[Rule]", " ", "50"}], ",", " ", RowBox[{"ZL", "\[Rule]", " ", RowBox[{"RL", "+", RowBox[{"\[ImaginaryI]", " ", "XL"}]}]}]}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"ZI", "=", RowBox[{ RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{ RowBox[{"-", "\[ImaginaryI]"}], " ", "2", "\[Pi]", " ", "z"}]], RowBox[{"(", RowBox[{"1", "-", "\[CapitalGamma]"}], ")"}]}], "//.", RowBox[{"{", RowBox[{ RowBox[{"\[CapitalGamma]", "\[Rule]", " ", RowBox[{"\[CapitalGamma]L", " ", SuperscriptBox["\[ExponentialE]", RowBox[{"2", "\[ImaginaryI]", " ", "2", "\[Pi]", " ", "z"}]]}]}], ",", " ", RowBox[{"\[CapitalGamma]L", "\[Rule]", FractionBox[ RowBox[{"ZL", "-", "Z0"}], RowBox[{"ZL", "+", "Z0"}]]}], " ", ",", " ", RowBox[{"Z0", "\[Rule]", " ", "50"}], ",", " ", RowBox[{"ZL", "\[Rule]", " ", RowBox[{"RL", "+", RowBox[{"\[ImaginaryI]", " ", "XL"}]}]}]}], "}"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ComplexExpand", "[", RowBox[{"Abs", "[", RowBox[{"V", "//.", RowBox[{"{", RowBox[{ RowBox[{"RL", "\[Rule]", " ", "rl"}], ",", " ", RowBox[{"XL", "\[Rule]", " ", "xl"}]}], "}"}]}], "]"}], "]"}], ",", RowBox[{"ComplexExpand", "[", RowBox[{"Abs", "[", RowBox[{"ZI", "//.", RowBox[{"{", RowBox[{ RowBox[{"RL", "\[Rule]", " ", "rl"}], ",", " ", RowBox[{"XL", "\[Rule]", " ", "xl"}]}], "}"}]}], "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"z", ",", RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "2"}], "}"}]}], "}"}]}], ",", RowBox[{"PlotLegends", "\[Rule]", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}]}], ",", RowBox[{ "PlotLabel", "\[Rule]", "\"\<\!\(\*SubscriptBox[\(Z\), \(L\)]\)=rl+\[ImaginaryI]xl, \ \!\(\*SubscriptBox[\(Z\), \(0\)]\)=50\[CapitalOmega] \>\""}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"z", "/", "\[Lambda]"}], "}"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"rl", ",", "0"}], "}"}], ",", "0", ",", "200"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"xl", ",", "0"}], "}"}], ",", RowBox[{"-", "100"}], ",", "100"}], "}"}]}], "]"}], "\[IndentingNewLine]"}]}]], "Input", CellChangeTimes->{{3.719131361951139*^9, 3.719131489535142*^9}, { 3.719131524951174*^9, 3.719131655215077*^9}, {3.719131699215879*^9, 3.7191317486241827`*^9}, 3.719131795087759*^9, 3.719131846471339*^9, { 3.7191318959198637`*^9, 3.719131907207076*^9}, {3.7191323033214293`*^9, 3.71913232023412*^9}, {3.7191323861548567`*^9, 3.71913242317724*^9}, { 3.719134932054991*^9, 3.719134939742619*^9}, {3.719134992339569*^9, 3.7191349945940247`*^9}}, CellLabel->"In[1]:=",ExpressionUUID->"d3ed1de8-7862-4181-a7b7-65e5b38fe30f"], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`rl$$ = 27.8, $CellContext`xl$$ = -70.6, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`rl$$], 0}, 0, 200}, {{ Hold[$CellContext`xl$$], 0}, -100, 100}}, Typeset`size$$ = { 891., {237., 248.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`rl$38971$$ = 0, $CellContext`xl$38972$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`rl$$ = 0, $CellContext`xl$$ = 0}, "ControllerVariables" :> { Hold[$CellContext`rl$$, $CellContext`rl$38971$$, 0], Hold[$CellContext`xl$$, $CellContext`xl$38972$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Plot[{ ComplexExpand[ Abs[ ReplaceRepeated[$CellContext`V, {$CellContext`RL -> \ $CellContext`rl$$, $CellContext`XL -> $CellContext`xl$$}]]], ComplexExpand[ Abs[ ReplaceRepeated[$CellContext`ZI, {$CellContext`RL -> \ $CellContext`rl$$, $CellContext`XL -> $CellContext`xl$$}]]]}, \ {$CellContext`z, -1, 0}, PlotRange -> {{-1, 0}, {0, 2}}, PlotLegends -> {"Abs(V)", "Abs(I)"}, PlotLabel -> "\!\(\*SubscriptBox[\(Z\), \(L\)]\)=rl+\[ImaginaryI]xl, \ \!\(\*SubscriptBox[\(Z\), \(0\)]\)=50\[CapitalOmega] ", AxesLabel -> {$CellContext`z/$CellContext`\[Lambda]}], "Specifications" :> {{{$CellContext`rl$$, 0}, 0, 200}, {{$CellContext`xl$$, 0}, -100, 100}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{975., {330., 341.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$}, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{ 3.719131550984949*^9, {3.7191315904650497`*^9, 3.719131613725054*^9}, 3.719131656048573*^9, {3.7191316970913353`*^9, 3.719131741652755*^9}, 3.719131795682831*^9, 3.7191318488605957`*^9, {3.7191319106863613`*^9, 3.719131939318873*^9}, {3.719132311935886*^9, 3.7191323212348757`*^9}, 3.719132362517391*^9, 3.719132426598508*^9, 3.719133851443568*^9, 3.719134072362335*^9, 3.7191347721047897`*^9, {3.719134941281701*^9, 3.719134996721143*^9}, 3.719143004803656*^9, {3.7832332504817247`*^9, 3.783233260014599*^9}}, CellLabel->"Out[3]=",ExpressionUUID->"9264d532-d669-4efe-8958-9af654761222"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", RowBox[{"(*", RowBox[{ "This", " ", "code", " ", "plots", " ", "the", " ", "amplitude", " ", "of", " ", "voltage", " ", "and", " ", "the", " ", "real", " ", "voltage", " ", "signal", " ", "along", " ", "a", " ", "transmission", " ", "line", " ", "terminated", " ", "by", " ", "an", " ", "arbitrary", " ", "impedance"}], "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"ComplexExpand", "[", RowBox[{"Abs", "[", RowBox[{"V", "//.", RowBox[{"{", RowBox[{ RowBox[{"RL", "\[Rule]", " ", "rl"}], ",", " ", RowBox[{"XL", "\[Rule]", " ", "xl"}]}], "}"}]}], "]"}], "]"}], ",", RowBox[{"ComplexExpand", "[", RowBox[{"Re", "[", RowBox[{ RowBox[{ SuperscriptBox["\[ExponentialE]", RowBox[{"\[ImaginaryI]", " ", "\[Omega]t"}]], " ", "V"}], "//.", RowBox[{"{", RowBox[{ RowBox[{"RL", "\[Rule]", " ", "rl"}], ",", " ", RowBox[{"XL", "\[Rule]", " ", "xl"}]}], "}"}]}], "]"}], "]"}]}], " ", "}"}], ",", RowBox[{"{", RowBox[{"z", ",", RowBox[{"-", "2"}], ",", "0"}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", "2"}], "}"}]}], "}"}]}], ",", RowBox[{"PlotLegends", "\[Rule]", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}]}], ",", RowBox[{ "PlotLabel", "\[Rule]", "\"\<\!\(\*SubscriptBox[\(Z\), \(L\)]\)=rl+\[ImaginaryI]xl, \ \!\(\*SubscriptBox[\(Z\), \(0\)]\)=50\[CapitalOmega] \>\""}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"z", "/", "\[Lambda]"}], "}"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"rl", ",", "50"}], "}"}], ",", "0", ",", "200"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"xl", ",", "0"}], "}"}], ",", RowBox[{"-", "100"}], ",", "100"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\[Omega]t", ",", "0"}], "}"}], ",", "0", ",", RowBox[{"2", " ", "Pi"}]}], "}"}]}], "]"}]}]], "Input", CellChangeTimes->{{3.719134154072166*^9, 3.719134349693157*^9}, { 3.719134394229456*^9, 3.719134395299835*^9}, {3.71913449504904*^9, 3.719134530582304*^9}, {3.719134948669601*^9, 3.71913495069221*^9}, 3.7191350384978647`*^9, {3.719135076993801*^9, 3.71913511003179*^9}, { 3.7191351771986923`*^9, 3.71913517986145*^9}, 3.783233394939663*^9}, CellLabel->"In[6]:=",ExpressionUUID->"460c3bce-321c-4285-b5f6-177a31758152"], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`rl$$ = 26.400000000000002`, $CellContext`xl$$ = -44.599999999999994`, \ $CellContext`\[Omega]t$$ = 3.9191125073771667`, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`rl$$], 50}, 0, 200}, {{ Hold[$CellContext`xl$$], 0}, -100, 100}, {{ Hold[$CellContext`\[Omega]t$$], 0}, 0, 2 Pi}}, Typeset`size$$ = { 891., {228., 239.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`rl$167047$$ = 0, $CellContext`xl$167048$$ = 0, $CellContext`\[Omega]t$167049$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`rl$$ = 50, $CellContext`xl$$ = 0, $CellContext`\[Omega]t$$ = 0}, "ControllerVariables" :> { Hold[$CellContext`rl$$, $CellContext`rl$167047$$, 0], Hold[$CellContext`xl$$, $CellContext`xl$167048$$, 0], Hold[$CellContext`\[Omega]t$$, $CellContext`\[Omega]t$167049$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Plot[{ ComplexExpand[ Abs[ ReplaceRepeated[$CellContext`V, {$CellContext`RL -> \ $CellContext`rl$$, $CellContext`XL -> $CellContext`xl$$}]]], ComplexExpand[ Re[ ReplaceRepeated[ E^(I $CellContext`\[Omega]t$$) $CellContext`V, {$CellContext`RL -> \ $CellContext`rl$$, $CellContext`XL -> $CellContext`xl$$}]]]}, \ {$CellContext`z, -2, 0}, PlotRange -> {{-2, 0}, {-2, 2}}, PlotLegends -> {"Abs(V)", "V(t)"}, PlotLabel -> "\!\(\*SubscriptBox[\(Z\), \(L\)]\)=rl+\[ImaginaryI]xl, \ \!\(\*SubscriptBox[\(Z\), \(0\)]\)=50\[CapitalOmega] ", AxesLabel -> {$CellContext`z/$CellContext`\[Lambda]}], "Specifications" :> {{{$CellContext`rl$$, 50}, 0, 200}, {{$CellContext`xl$$, 0}, -100, 100}, {{$CellContext`\[Omega]t$$, 0}, 0, 2 Pi}}, "Options" :> {}, "DefaultOptions" :> {}], ImageSizeCache->{975., {415., 426.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$}, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellChangeTimes->{ 3.719135180867165*^9, 3.783233318101533*^9, 3.7832333513036537`*^9, { 3.783233396964044*^9, 3.783233402133686*^9}, {3.783399822630052*^9, 3.783399835252532*^9}}, CellLabel->"Out[6]=",ExpressionUUID->"36cafa7f-5c9b-47ba-88a7-d47f872c0864"] }, Open ]], Cell[BoxData["\[AliasDelimiter]"], "Input", CellChangeTimes->{ 3.7834002013994503`*^9},ExpressionUUID->"be4dd180-ea84-47ce-8818-\ fd0098e42d6c"] }, WindowSize->{Full, Full}, WindowMargins->{{Automatic, -1180}, {5, Automatic}}, Magnification->2., FrontEndVersion->"12.0 for Mac OS X x86 (64-bit) (April 8, 2019)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 4703, 119, 690, "Input",ExpressionUUID->"d3ed1de8-7862-4181-a7b7-65e5b38fe30f"], Cell[5286, 143, 3067, 61, 707, "Output",ExpressionUUID->"9264d532-d669-4efe-8958-9af654761222"] }, Open ]], Cell[CellGroupData[{ Cell[8390, 209, 3042, 76, 632, "Input",ExpressionUUID->"460c3bce-321c-4285-b5f6-177a31758152"], Cell[11435, 287, 3071, 61, 877, "Output",ExpressionUUID->"36cafa7f-5c9b-47ba-88a7-d47f872c0864"] }, Open ]], Cell[14521, 351, 147, 3, 59, "Input",ExpressionUUID->"be4dd180-ea84-47ce-8818-fd0098e42d6c"] } ] *)