Here is a quote from a site on brake controllers.
Proportional brake controllers are also known as
pendulum brake controllers because of the way they sense motion. These devices use the position of a pendulum as a motion-sensing device, and drivers typically need to calibrate them before using them. When the vehicle is on a level plane and the pendulum is pointing straight down to the ground, the brake controller doesn't sense any motion and won't send any signals to the trailer's brakes. When the vehicle moves, however, the pendulum points toward the rear of the vehicle. As soon as the vehicle brakes, the pendulum swings forward. Depending on how far the pendulum swings, the brake controller sends a degree of power to the trailer's brakes.
Here is a link to the site if you want to read more.
Types of Brake Controllers - HowStuffWorks