Skip to content

Commit

Permalink
Merge pull request #51 from Ashutosh781/master
Browse files Browse the repository at this point in the history
[05/01/2021] Image issue in control theory fixed
  • Loading branch information
veds12 committed Jan 5, 2021
2 parents 4a70309 + 8017019 commit b91be19
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 71 deletions.
48 changes: 13 additions & 35 deletions docs/automation/ControlTheory/Control_Theory.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ A robot can exhibit a number of different behaviors, depending on the task and i

In each of these cases, it is the job of the robot controller to convert the task specification to forces and torques at the actuators. Control strategies that achieve the behaviors described above are known as **motion control**, **force control**, **hybrid motion-force control**, or **impedance control**.



![](images\controller.png)


<center>![](images/controller.png)</center>

A typical control block diagram is shown above The sensors are typically: potentiometers, encoders, or resolvers for joint position and angle sensing; tachometers for joint velocity sensing; joint force-torque sensors; and/or multi-axis force-torque sensors.

Expand All @@ -18,11 +14,7 @@ A typical control block diagram is shown above The sensors are typically: potent

A control system in which the control action is totally independent of output of the system then it is called **open loop control system**. A manual control system is also an open loop control system. The figure below shows a control system block diagram of an open loop control system in which process output is totally independent of the controller action.



![](images\controller_1.png)


<center>![](images/controller_1.png)</center>

**Practical examples of Open loop control system:**

Expand All @@ -34,11 +26,7 @@ A control system in which the control action is totally independent of output of

Control system in which the output has an effect on the input quantity in such a manner that the input quantity will adjust itself based on the output generated is called **closed loop control system**. **Open loop control system** can be converted in to closed loop control system by providing a feedback. Figure below shows the block diagram of closed loop control system in which feedback is taken from output and fed in to input.



![](images\controller_2.png)


<center>![](images/controller_2.png)</center>

**Practical example of Closed loop control system:**

Expand All @@ -60,13 +48,11 @@ Before we design any controller, we have to consider the key factors that will d

5.**Optimality :** It is a set of differential equations that describe the paths of the control variables that minimize the cost function.



## Laplace transform

The Laplace transform plays a important role in control theory. It appears in the description of linear time invariant systems, where it changes convolution operators into multiplication operators and allows to define the transfer function of a system. The properties of systems can be then translated into properties of the transfer function. It allows the use of graphical methods to predict system performance without solving the differential equations of the system. These include response, steady state behavior, and transient behavior.

#### Laplace Vs Fourier transform
### Laplace Vs Fourier transform

Laplace transform:<br>
$F(s)=\int_{0}^{\infty}f(t)e^{-st}dt \qquad f^{'}(t)\Rightarrow sF(s)$<br><br>
Expand All @@ -76,13 +62,11 @@ Laplace transforms often depend on the initial value of the function whereas Fou

To understand Laplace transform in detail read [this](https://www.electrical4u.com/laplace-transformation/) article

## Closed Loop Transfer Function
## Closed Loop Transfer Function

A **closed-loop transfer function** in control theory is a mathematical expression describing the net result of the effects of a closed feedback loop on the input signal to the circuits enclosed by the loop.



![](images\controller_4.png)
<center>![](images/controller_4.png)</center>

Where: block G represents the open-loop gains of the controller or system and is the forward path, and block H represents the gain of the sensor, transducer or measurement system in the feedback path.

Expand All @@ -106,30 +90,24 @@ Therefore: G x Input = Output + G x H x Output

Rearranging the above gives us the closed-loop transfer function of:

![](images\controller_5.png)


<center>![](images/controller_5.png)</center>

## Controllability

![](images\controlablity.png)<br>
<center>![](images/controlablity.png)

![](images\controlablity_1.jpg)
![graph](images/controlablity_1.jpg) </center>

## Types of Feedback Control

#### Positive Feedback
### Positive Feedback

In a “positive feedback control system”, the set point and output values are added together by the controller as the feedback is “in-phase” with the input. The effect of positive (or regenerative) feedback is to “increase” the systems gain, i.e, the overall gain with positive feedback applied will be greater than the gain without feedback]

#### Negative Feedback
### Negative Feedback

In a “negative feedback control system”, the set point and output values are subtracted from each other as the feedback is “out-of-phase” with the original input. The effect of negative (or degenerative) feedback is to “reduce” the gain. As a rule negative feedback systems are more stable than positive feedback systems. Negative feedback also makes systems more immune to random variations in component values and inputs.

<center>![](images/whatis-feedback_loop_mobile.jpg)</center>


![](images\whatis-feedback_loop_mobile.jpg)



To know more about different types of control systems you can read [this](https://www.electrical4u.com/types-of-systems-linear-and-non-linear-system/) article
To know more about different types of control systems you can read [this](https://www.electrical4u.com/types-of-systems-linear-and-non-linear-system/) article.
9 changes: 3 additions & 6 deletions docs/automation/ControlTheory/LQR.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ The theory of optimal control is concerned with operating a dynamic system at mi

The settings of a (regulating) controller governing either a machine or process (like an airplane or chemical reactor) are found by using a mathematical algorithm that minimizes a cost function with weighting factors needed to be supplied. A **cost function** is a function that maps an event or values of one or more variables onto a real number intuitively representing some "cost" associated with the event. The cost function is often defined as a sum of the deviations of key measurements, like altitude or process temperature, from their desired values. The algorithm thus finds those controller settings that minimize undesired deviations. The magnitude of the control action itself may also be included in the cost function.

#### Finite horizon LQR
## Finite horizon LQR

For a continuous-time linear system, defined on $t \epsilon [t_0,t_1]$ , described by:<br><br>
$\dot{x} = Ax + Bu$<br><br>


with a quadratic cost function defined as:
$J = x^T (t_1)F(t_1)x(t_1) + \int_{t_0}^{t_1} (x^TQx + u^TRu + 2x^TNu) \,dt$<br><br>
the feedback control law that minimizes the value of the cost is:<br><br>
Expand All @@ -21,16 +20,14 @@ $A^TP(t) + P(t)A - (P(t)B+N)R^{-1}(B^TP(t) + N^T) + Q = - \dot{P}(t)$<br><br>
with the boundary condition:<br><br>
$P(t_1)=F(t_1)$


To learn more in detail about LQR controller watch [this](https://www.youtube.com/watch?v=1_UobILf3cc&list=RDCMUCm5mt-A4w61lknZ9lCsZtBw&start_radio=1&t=7) video by Steve Brunton

#### Linear Quadratic Gaussian (LQG) control theory
## Linear Quadratic Gaussian (LQG) control theory

Here, Given a linear model of the plant in a statespace description, and assuming that the disturbance and measurement noise are Gaussian stochastic processes with known power spectral densities, the designer translates the design specifications into a quadratic performance criterion consisting of some state variables and control signal inputs. The object of design then is to minimize the performance criterion by using appropriate state or measurement feedback controllers while guaranteeing the closed-loop stability. When LQG controller problem is solved in a deterministic setting, known as an H<sub>2</sub> optimal control problem, in which the H<sub>2</sub> norm of a certain transfer function from an exogenous disturbance to a pertinent controlled output of a given plant is minimized by appropriate use of an internally stabilizing controller.

To learn about robust controllers and LQG control problem in detail watch [this](https://www.youtube.com/watch?v=7OZVbqPQ2Zw) video

**H∞** (i.e. "**H-infinity**") **methods** are used in control theory to synthesize controllers to achieve stabilization with guaranteed performance. To use *H*∞ methods, a control designer expresses the control problem as a mathematical optimization problem and then finds the controller that solves this optimization. *H*∞ techniques have the advantage over classical control techniques in that *H*∞ techniques are readily applicable to problems involving multivariate systems with cross-coupling between channels.

Read [this]() material from MIT Open Courseware to know about H∞ methods in more detail.

Read [this]() material from MIT Open Courseware to know about H∞ methods in more detail.
13 changes: 6 additions & 7 deletions docs/automation/ControlTheory/MPC.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ If the model uncertainties are small enough we get a linear system with a distur

**Model Predictive Control(MPC)** is the most widely known model based controller. Model Predictive Controllers rely on the dynamic models of the process, most often linear empirical models obtained by system identification.

Model predictive control offers several important advantages:
Model predictive control offers several important advantages:

(1) the process model captures the dynamic and static interactions between input, output, and disturbance variables,
(1) the process model captures the dynamic and static interactions between input, output, and disturbance variables,

(2) constraints on inputs and outputs are considered in a systematic manner,
(2) constraints on inputs and outputs are considered in a systematic manner,

(3) the control calculations can be coordinated with the calculation of optimum set points, and
(3) the control calculations can be coordinated with the calculation of optimum set points, and

(4) accurate model predictions can provide early warnings of potential problems.

The mathematics and concepts involved in MPC are a bit complex and require a decent understanding of mathematics of control theory.

To study more about MPC controller read [this](http://folk.ntnu.no/skoge/vgprosessregulering/papers-pensum/seborg-c20ModelPredictiveControl.pdf) material by NTNU
To study more about MPC controller read [this](http://folk.ntnu.no/skoge/vgprosessregulering/papers-pensum/seborg-c20ModelPredictiveControl.pdf) material by NTNU

You can also check [this](https://www.youtube.com/watch?v=YwodGM2eoy4) video by Steve Brunton to get a more detailed idea

Expand All @@ -38,5 +38,4 @@ Some of the other resources you should check to understand control theory and va
2. Control Systems [Lectures](https://www.youtube.com/user/ControlLectures) by Brian Douglas
3. Control of Mobile Robots [course](https://www.my-mooc.com/en/mooc/control-of-mobile-robots/) by Georgia Tech University on Coursera
4. Modern Robotics - Mechanical, Planning and Control by Kevin.M.Lynch and Frank.C.Park
5. MIT Courseware Control Theory [Notes](https://ocw.mit.edu/courses/mechanical-engineering/2-017j-design-of-electromechanical-robotic-systems-fall-2009/lecture-notes/MIT2_017JF09_control.pdf)

5. MIT Courseware Control Theory [Notes](https://ocw.mit.edu/courses/mechanical-engineering/2-017j-design-of-electromechanical-robotic-systems-fall-2009/lecture-notes/MIT2_017JF09_control.pdf)
26 changes: 9 additions & 17 deletions docs/automation/ControlTheory/PID_Controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ Linear Control technique is the most widely used technique for designing control

PID control is the most popular technique used in industries because it is relatively easy and simple to design and implement. Most importantly, it works in most practical situations, although its performance is somewhat limited owing to its restricted structure.



![](images\Pid.jpg)
<center>![](images/Pid.jpg)</center>

Hence, a PID control law has the following general form for the input command:<br><br>
$u(t) = K~p~e(t) + K~i~\int e(t) + K~d~\frac{de(t)}{dt}$<br><br>
Expand All @@ -24,23 +22,19 @@ The proportional factor is easiest to understand: The output of the proportional

The downside to a proportional-only loop is that when error becomes too small, loop output becomes negligible. Therefore, even when the proportional loop reaches steady state, there is still error. The larger the proportional gain, the smaller the steady state error — but the larger the proportional gain, the more likely the loop is to become unstable. This dilemma leads to inevitable steady-state error called *offset*.



![](images\propotional.png)
<center>![](images/propotional.png)</center>

### Integral Factor

The main function of an integral control is to eliminate the steady state error and make the system follow the set point at steady state conditions. The integral controller leads to an increasing control command for a positive error, and a decreasing control command for a negative error. The downside to the integral factor is that it strongly contributes to controller output overshoot past the target setpoint. The shorter the integral time, the more aggressively the integral works.



![](images\integral.png)
<center>![](images/integral.png)</center>

### Derivative Factor

The purpose of derivative control is to improve the closed-loop stability of a system. A derivative controller has a predicting action by extrapolating the error using a tangent to the error curve. The derivative factor is the least understood and used of the three factors. In fact, a majority of PID loops in the real world are really just PI loops. A properly used derivative allows for more aggressive proportional and integral factors.

![](images\derivative.png)
<center>![](images/derivative.png)</center>

## PID Tuning Method

Expand All @@ -62,25 +56,23 @@ It is another popular method for tuning PID controllers. Ziegler and Nichols pre

- Obtain a unit step response of the plant experimentally and it may look‘s’ shaped curve as shown in figure below. This method applies, if obtained response exhibit s-shaped curve for unit step input otherwise it cannot be applied. This curve can also be obtained by dynamic simulation of the plant.

![](images\tuning_1.png)
<center>![](images/tuning_1.png)</center>

- Obtain two constants, delay time L and time constant T by drawing a tangent line at the inflection point of the s-shaped curve.
- Set the parameters of K<sub>p</sub>, T<sub>i</sub> , and T<sub>d<sub> values from the table given below for three types of controllers.

![](images\tuning_2.png)
<center>![](images/tuning_2.png)</center>

#### Second Method

- It is very similar to the trial and error method where integral and derivative terms are set to the zero, i.e., making Ti infinity and Td zero.
- Increase the proportional gain such that the output exhibits sustained oscillations. If the system does not produce sustained oscillations then this method cannot be applied. The gain at which sustained oscillations produced is called as critical gain.

![](images\tuning_3.png)
<center>![](images/tuning_3.png)</center>

- Once the sustain oscillations are produced, set the values of Ti and Td as per the given table for P, PI and PID controllers based on critical gain and critical period.

![](images\tuning_4.png)

<center>![](images/tuning_4.png)</center>

<br><br>
Recently many intelligent methods have also been developed for tuning PID controllers one of such method is using genetic algorithms. To learn more about this method watch [this](https://www.youtube.com/watch?v=3yU2k8R9JeU&t=308s) 2 part video by Steve Brunton.

Recently many intelligent methods have also been developed for tuning PID controllers one of such method is using genetic algorithms. To learn more about this method watch [this](https://www.youtube.com/watch?v=3yU2k8R9JeU&t=308s) 2 part video by Steve Brunton.
6 changes: 0 additions & 6 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@ google_analytics:

nav:
- Home: index.md

- Overview:
- What is Robotics?: overview/what_is_robotics.md
- Key Areas: overview/key_areas.md
- Reference Material: overview/reference_material.md

- Automation:
- Introduction: automation/intro.md
- ROS:
Expand Down

0 comments on commit b91be19

Please sign in to comment.