Help me understand the usefulness of control theory please

Click For Summary
SUMMARY

This discussion centers on the application of control theory, particularly in the context of cruise control systems in vehicles. The conversation highlights the importance of using a Proportional-Integral-Derivative (PID) controller to manage vehicle speed smoothly, avoiding oscillations and ensuring efficient fuel usage. Key concepts such as transfer functions and the relationship between throttle input and vehicle speed are discussed, emphasizing the need for proper tuning of control parameters (K1 and K2) to achieve stability and responsiveness in control systems.

PREREQUISITES
  • Understanding of Proportional-Integral-Derivative (PID) controllers
  • Familiarity with transfer functions and Laplace transforms
  • Basic knowledge of differential equations
  • Concepts of system stability and oscillatory behavior
NEXT STEPS
  • Research the tuning methods for PID controllers to optimize performance
  • Explore the derivation and application of transfer functions in control systems
  • Study the dynamics of oscillatory systems and their damping techniques
  • Learn about the implementation of control theory in various systems beyond automotive applications, such as HVAC systems
USEFUL FOR

Engineers, programmers, and students interested in control systems, particularly those working on automotive applications or any field requiring precise control of dynamic systems.

knight92
Messages
100
Reaction score
0
I am looking at control theory but I don't understand how this is used in real systems.

Lets take an example of a cruise control system on a car which is also a control system. I can use an embedded computer connected to a hall effect sensor which measures the speed of the vehicle and also connect it to the throttle input which controls the speed of the vehicle. From a programmers perspective, I can just simply use if else statements to control the vehicle's speed e.g. if the hall effect sensor reads a significant drop in vehicle speed due to an upwards hill the the throttle input is increased until the desired speed is reached again and vice versa for a downwards hill. Why would I need transfer functions etc? Or can you give me an example where something like transfer functions and things like that would be used?
 
Engineering news on Phys.org
Sure you could tell the cruise control to just hit the gas when the speed drops, but control theory would help you do this in a way that doesn't make the speed oscillate about the setpoint, that doesn't make the vehicle occupants sick, that uses fuel efficiently, and other such niceties like that. You want that acceleration to be smooth and end on your speed of choice, not abrupt and jerky.
 
boneh3ad said:
Sure you could tell the cruise control to just hit the gas when the speed drops, but control theory would help you do this in a way that doesn't make the speed oscillate about the setpoint, that doesn't make the vehicle occupants sick, that uses fuel efficiently, and other such niceties like that. You want that acceleration to be smooth and end on your speed of choice, not abrupt and jerky.

Ok can you give me an example of what sort of equations one would use to ramp the throttle signal up to make the acceleration smooth? What if the speed is linearly proportional to the throttle, can I not just use that relationship in a loop to ramp it until the speed is reached? That way the acceleration would be smooth wouldn't it? Although I can kind of see how overshoot percentage could be used to reduce the oscillation if the throttle input is too much.
 
One thing that helped me to understand controls theory (still no expert) is to think about it as an oscillatory system, as boneh3ad has done. Consider a cruise control system that increases the throttle proportional to how much the speed is below the setpoint (the error). Now your change in torque is some gain times the error: dT = -K dv. Then this is much like a spring mass system where the spring force is proportional to displacement from equilibrium (dF = -k x). You know that a spring/mass system with no damping will oscillate forever. So will a cruise control system like this. To "damp out" the oscillation, you need to put in a term related to the rate of change of speed. So it would look like dT = -K1 (v-v_set) - K2 dv/dt. Depending on what K1 and K2 are, and the mass of the vehicle, etc., the system could respond quickly (high natural frequency) or slowly (low natural frequency), and be stable (exponentially decay of oscillations) or unstable (exponential growth of oscillations).
The K1 and K2 terms are gains you'd set in a PID (proportional/integral/differential) controller. the K1 above tunes the response to the speed error, and K2 tunes the response to the rate of change of error.
Again, I'm not a controls expert, so some of the details above might need to be tweaked a bit. But the main thing is that the control system will generally produce an oscillatory response of what's controlled (here speed). To get a quickly-responding system (large K1) you risk instability, so tuning in damping is essential.
 
  • Like
Likes Greg Bernhardt
knight92 said:
What if the speed is linearly proportional to the throttle,
If speed were linearly proportional to the throttle you wouldn't need a control system!

Anyway it sounds like what you are describing to do in code is essentially what a PID controller does. Because PID controllers have been studied a lot (they are used everywhere) there is a lot of information around about how best to tune them to a particular system. Sure, have a play about trying to develop something from scratch, it will be a useful learning experience. But also then look up PID controllers. The next system you are looking to control might not be so fast to respond as a car (eg heating a house) and using a trial-and-error approach would just take forever to get right.
 
Hi, I am sorry for a late reply to my old thread but I went away and did some more learning and thought it will be better to ask the question here.

I do now somewhat understand what the usefulness is but still don't quite get many things e.g.

A transfer function is a ratio of output/input Laplace right? And if I wanted to control a rolling ball then would I need to find the equation of motion of the ball which will be the output differential equation and Laplace transform it but what if the input to the rolling ball was a baseball bat, how would I even go on to finding the differential equation for that? Am I even on the right path? As I understand it, I can use the transfer function to control how hard to hit the ball with a bat to achieve a certain speed?
 

Similar threads

  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 16 ·
Replies
16
Views
13K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
4
Views
5K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 8 ·
Replies
8
Views
8K
  • · Replies 12 ·
Replies
12
Views
3K
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K