[MAS.865](/index.html) > [Motion](/motion) > Servo Motors and Control
## Servo Motors
#### Closed Loop Control
---
#### Servo Control:
Types of control vary between actuators, but generally we can either control them with 'open loop' or 'closed loop' methods. The word 'servo' simply implies closed loop control.
So, a Brushless Motor or a Stepper Motor can both become Servo Motors. Similarly, we can have servo control on hydraulic or pneumatic actuators.

PID is a straightforward, extremely common, and fairly effective model for control. We take some set point *u(t)* and measure an outcome *y(t)* (position, speed, temperature, etc). Using the error between these values *e(t)* we compute a proportional term *P* that is proportional to the instantaneous error, an integral term *I* (accumulated error over time) and a derivative term *D* - change in error.
The tuning parameters *K_p, K_i and K_d* are used to weight these terms in a sum, which we use to drive the output (voltage, torque, etc).

#### Hobby Servo
Often, when people talk about servos they are referring to these:

Which are really just a type of DC gearmotor paired with a position encoder (sometimes a potentiometer, sometimes digital). These are often controlled with a PWM cycle that, as it turns out, is nontrivial to implement with a microcontrollers PWM hardware, using a 2ms pulse width with duty cycle of 0-100% between 1 and 2ms, but varying between actuators. See [this sparkfun tutorial](https://learn.sparkfun.com/tutorials/hobby-servo-tutorial) for more on that.


#### Other Instantations
We also have Hydraulic Servos
Pneumatic Servo
DC Gearmotor Servos
Harmonic Drive Servos
Linear Servos
Voicecoil Servos
etc...