Why do we use control?
Why use control at all?
* Correct or wrong?
Supplying a certain voltage / pulsewidth will make the motor spin at a certain speed.
* Not always!
This will only work in idle condition, not under load (e.g. driving up a slope)
What is motor control and how is it done?
What are some things to consider when working with motor control?
What is an On-Off controller
Simplest case: Only on/off of control value, “Bang-Bang Controller
Refer to slides (NEED TO KNOW HOW TO CODE)
What is a timer?
What are some parameters to consider for background timer frequency
Parameters to consider
* Encoder ticks per meter
* Lowest controlled speed
Refer to slides
What is a watchdog timer?
A watchdog is a specialized timer/counter
* It is initialized to a certain value and keeps counting down
* If the watchdog counter reaches zero, an interrupt is raised
➢ Correctly running program will reset the watchdog timer in regular intervals to its initial value, so no interrupt will occur
➢ Effective tool for fault detection, e.g. if program “hangs”
➢ Can be used to detect hardware errors and software errors
Refer to slides
On-Off Controller with Hysteresis
Refer to slides
What is a proportional controller?
P-controller (proportional controller)
R(t) = Kp * (vdes(t) - vact(t))
Linear change of control value to reduce error → better controller
Where:
* Kp is a constant value, “controller gain”
* Kp must be selected to achieve fast goal speed without overshoot
* Note: No equilibrium when desired velocity is reached: if vdes(t) = vact(t) then R(t) = 0
Refer to slides
What is an intergral controller?
Adding I-Controller (Integral Controller) Part
* Problem: P-Controller may reach equilibrium without reaching the target velocity → steady state error
* Solution: Integral part is used to eliminate steady state error (REFER TO SLIDES FOR EQUATION)
What is dertivative controller?
Adding D-Controller (Derivative Controller) Part
* Problems: P-Controller responds slow to change in input P-Controller with high gain tends to oscillate
* Solution: Add a derivative term for response/damping (REFER TO SLIDES FOR EQUATION)
What is a PID controller?
REFER TO SLIDES (FOR EQUATIONS)
PID-Controller is combination of P, I, and D controller
* Simple, universal controller
* Trade-offs: Response time vs. stability
* Noise limits max. proportional gain
* Note physical limits of actuator e.g. max acceleration, velocity
What are the tuning method for PID Paramter Tuning?
Manual Tuning
Ziegler-Nichols method
Cohen-Coon method
What is Manual tuning?
What is velocity control?
Velocity Control is what we have achieved so far We can make a motor drive at a certain speed and make it maintain that speed
Refer to slides
What is Position control?
Position Control also incorporates a start/stop phase and makes the motor stop at a certain location E.g. exactly after one full revolution
Refer to slides
What is a practical way to achieve position control?