AP Algorithm Basics

AP Algorithm Basics

7 August 2023 0 By Anshul Pal

In this tutorial we are going to understand about AP Algorithm Basics and Structure of an APAlgorithm, how it works. Let’s start our exciting journey Before learning about AP Algorithm Basics we have a little bit knowledge about the MPSL algorithm.

MPSL algorithms resemble sets of instructions designed for special processors known as MPS Algorithm Processors (APs). People refer to these processors as Motorola 68000 microprocessors. They work independently and handle small parts of the SLC accelerator. One AP, called the “Supervisor,” takes charge of coordinating all the other APs. The Supervisor looks at the outputs of the other processors and decides on a safe rate for the whole SLC accelerator, which it communicates to the MPG.

The rest of the APs are called “regular” APs. They take input from monitoring devices in the SLC. After that, they use information to figure out a safe rate for their specific part of the accelerator. They then send this rate to the Supervisor. The way they perform this calculation is defined by an MPSL algorithm. Basically, it is like a set of rules or steps for each AP to follow. Each AP has its own specific algorithm.

AP Algorithm Hierarchy

Hierarchy of MPS Control





In addition to receiving input from SLC devices, the Supervisor also provides some information to the APs. This input includes the current bgrp (beam group) and its repetition rate from the last PNET broadcast. Using this information along with the current status of stoppers in their sector, each AP decides on an expression to evaluate. These expressions are based on the states of SLC devices, identified by their database name and “component” value. The result of this evaluation is an SLC repetition rate as defined in the SCP’s beam rate control.

Structure of an AP Algorithm

As explained earlier, the expressions used to decide a new rate in the SLC are based on the current state of the accelerator. These expressions need to specify the following for each rate choosing scenario:

  1. Which beam groups (bgrp’s) are relevant.
  2. Which repetition rates the SLC is currently operating on that are relevant.
  3. Which stoppers, along with their current states, are relevant.

The structure of all AP algorithms includes some header information, followed by a series of scoping statements and expressions. The scoping statements help determine the context in which the expressions will be used. Each expression is responsible for making decisions based on the specified scope. This process continues until the expressions cover all possible situations in the AP’s region of the SLC, and they give guidance on what to do in each of these situations.

Structure of AP Algorithm



















Thanks for reading. We hope that you like this post. If you have any queries related to this article, leave a comment down below!

Suggested Readings