Help me understand the usefulness of control theory please

In summary, a cruise control system uses a control theory approach to make the acceleration smooth and end on the set speed.
  • #1
knight92
101
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
  • #2
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.
 
  • #3
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.
 
  • #5
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
  • #6
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.
 
  • #7
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?
 

1. How does control theory apply to real-life situations?

Control theory is a branch of mathematics and engineering that deals with the control of systems. It is used to understand and manage processes and systems in various fields such as engineering, economics, and biology. It can be applied to real-life situations to better understand and control complex systems and processes.

2. What are the main benefits of using control theory?

Control theory allows for the analysis and optimization of systems, making them more efficient and effective. It also helps to predict and prevent potential problems or failures in a system. Additionally, control theory can be used to design and improve systems, making them more reliable and responsive to changes.

3. How is control theory useful in decision making?

Control theory provides a framework for making decisions by allowing for the analysis of various factors and variables within a system. It helps to identify the most important factors and how they affect the system, allowing for informed decision making. Control theory also allows for the evaluation of different scenarios and potential outcomes, aiding in decision making processes.

4. Can control theory be applied to both simple and complex systems?

Yes, control theory can be applied to both simple and complex systems. It is a versatile tool that can be used to understand and control systems of varying complexity. Control theory is often used in simple systems such as household appliances, as well as in complex systems such as global economies.

5. How can control theory improve efficiency and productivity?

By analyzing and optimizing systems, control theory can help improve efficiency and productivity. By understanding and controlling the factors that affect a system, it can be made more efficient and responsive to changes. Control theory can also identify areas for improvement and provide solutions for increasing productivity.

Similar threads

  • General Engineering
Replies
0
Views
585
  • General Engineering
Replies
3
Views
2K
Replies
1
Views
1K
Replies
4
Views
2K
  • General Engineering
Replies
16
Views
11K
  • Electrical Engineering
Replies
12
Views
2K
  • General Engineering
Replies
2
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
1K
Replies
17
Views
493
Back
Top