Skip to content

Commit

Permalink
Update explanation for RL problem
Browse files Browse the repository at this point in the history
  • Loading branch information
cr-xu committed Feb 2, 2024
1 parent 63ae083 commit a7321eb
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"Alternatively, you can create the virtual env with\n",
"\n",
"```bash\n",
"python3 -m venv -n rl-tutorial\n",
"python3 -m venv rl-tutorial\n",
"```\n",
"\n",
"and activate the env with `$ source <venv>/bin/activate` (bash) or `C:> <venv>/Scripts/activate.bat` (Windows)\n",
Expand Down Expand Up @@ -134,9 +134,9 @@
}
},
"source": [
"<h2 style=\"color: #b51f2a\"> AWAKE (The Advanced Proton Driven Plasma Wakefield Acceleration Experiment)</h2>\n",
"<h2 style=\"color: #b51f2a\"> AWAKE Accelerator</h2>\n",
"\n",
"AWAKE is an accelerator R&D project based at CERN. It investigates the use of plasma wakefields driven by a proton bunch to accelerate charged particles.\n",
"AWAKE (The Advanced Proton Driven Plasma Wakefield Acceleration Experiment) is an accelerator R&D project based at CERN. It investigates the use of plasma wakefields driven by a proton bunch to accelerate charged particles.\n",
"- The proton beam from the SPS is used to drive wakefields in a plasma cell.\n",
"- The wakefields in the plasma accelerate electrons coming from another beamline, like a surfer is accelerated by ocean waves.\n",
"- Plasmas can support extremely strong electric fields, with accelerating gradients of GV/m over meter-scale distances, which can reduce the size of future accelerators."
Expand All @@ -150,12 +150,14 @@
}
},
"source": [
"<h2 style=\"color: #b51f2a\"> AWAKE (The Advanced Proton Driven Plasma Wakefield Acceleration Experiment)</h2>\n",
"<h2 style=\"color: #b51f2a\"> AWAKE Accelerator</h2>\n",
"<p>\n",
"\n",
"(The Advanced Proton Driven Plasma Wakefield Acceleration Experiment)\n",
"\n",
"</p>\n",
"\n",
"<img src=\"img/awake.png\" style=\"width:40%; margin:auto;\"/>\n",
"<img src=\"img/awake.png\" style=\"width:60%; margin:auto;\"/>\n",
"\n",
"- **Momentum**: 10-20 MeV/c\n",
"- **Electrons per bunch**: 1.2e9\n",
Expand Down Expand Up @@ -198,14 +200,21 @@
"The problem is formulated in an episodic manner.\n",
"\n",
"<h3 style=\"color: #b51f2a\">Actions</h3>\n",
"The actions are the strenghts of 10 corrector magnets that can steer the beam.\n",
"They are normalized to [-1, 1], corresponding to $\\pm$ 100 mm.\n",
"The actuators are the strengths of 10 corrector magnets that can steer the beam.\n",
"They are normalized to [-1, 1]. \n",
"In this tutorial, we apply the action by adding a delta change $\\Delta a$ to the current magnet strengths .\n",
"\n",
"<h3 style=\"color: #b51f2a\">States/Observations</h3>\n",
"The observations are the readings of ten beam position monitors (BPMs), which read the position of the beam at a particular point in the beamline.\n",
"The observations are the readings of ten beam position monitors (BPMs), which read the position of the beam at a particular point in the beamline. The states are also normalized to [-1,1], corresponding to $\\pm$ 100 mm in the real accelerator.\n",
"\n",
"<h3 style=\"color: #b51f2a\">Reward</h3>\n",
"The reward is the negative RMS value of the distance to the target trajectory. "
"The reward is the negative RMS value of the distance to the target trajectory. \n",
"\n",
"$$\n",
"r(\\bm{O}) = - \\sqrt{ \\frac{1}{10} \\sum_{i=1}^{10} (O_{i} - O^{\\text{target}}_{i})^2},\n",
"$$\n",
"\n",
"where $\\bm{O}^{\\text{target}}=\\vec{0}$ for a centered orbit.\n"
]
},
{
Expand Down

0 comments on commit a7321eb

Please sign in to comment.