Cruise Control
Pretty interesting, the teacher in MATH213 gave a formal introduction to this.
We have a car to moves at a given velocity. We know Newton’s Laws of Motion , so . Taking into account drag, we’ll get this equation
- is the mass
- is a drag coefficient
- is the velocity of the car
- is the velocity forcing term
You should be very comfortable with the Transfer Function.
So if we want the car to go at a certain velocity, we can control .
Breaking down into 2 parts:
- is the control input
- is the disturbance input
The controller controls .
Now, how does this work exactly? Like if , and then , does the velocity instantly spike up? like the function has to be differentiable right. It’s a differential equation.
The teacher gets this problem to be solved in frequency space.
In time-domain In frequency-domain
- how the conversion is done is simply through the rules of the Transfer Function
We end up with our first Open Loop Controller.
It’s open-loop because there is no feedback into the system.
In standard form, the transfer function
Proportional Controller
Now, we design our first closed loop controller.
- is the Laplace transform of desired velocity function
So instead of directly feeding in a control input blindly, we know first look at the error , and that is used to dynamically adjust the control input .
Now, we obviously don’t know , but we can define it . The control input is some proportion to the error term.
We can write
V(s) &= \frac{1}{ms + b} F(s) \\ &= \frac{1}{ms + b} U(s) \quad \text{since D(s) = 0}\\ &= \frac{1}{ms + b} k_p E(s) \\ &= \frac{1}{ms + b} k_p (R(s) - V(s)) \end{align}$$ Therefore, $$V(s) = \frac{\frac{k_p}{ms + b}}{1 + \frac{k_p}{ms + b}} R(s)$$ We write it in [[notes/Standard First Order System|Standard First Order System]]: $$V(s) = \frac{\frac{k_p}{b+k_p}}{\frac{m}{b+k_p}s+1} R(s)$$ We know have our velocity in terms of some reference. But then how does it actually get working in real life?? - I'm confused Alright, so let's go back into time domain by taking the $v(t)$. [[notes/Standard First Order System|Standard First Order System]]. #### Integral Controller For the integral controller, we get that $$V(s) = P(s)C(s)E(s)$$ where - $P(s)$ is the car transfer function, the same as before $P(s) = \frac{1}{ms + b}$ - $C(s)$ is the controller transfer function - $E(s) =(R(s) - V(s))$ Notice how this is where we compose a transfer function. So we get $$V(s) = \frac{P(s)C(s)}{1 + P(s)C(s)} R(s)$$ - Actually, this is a more generic form. For proportional controller, the transfer function $C(s) = k_p$ (because remember we defined $C(s) = k_p E(s)$, for integral controller its a $\frac{k_i}{s}$. ### Next - [[notes/Adaptive Cruise Control|Adaptive Cruise Control]] ### Related - [[notes/Proportional Integral Derivative Control|PID]]