Hello. In this section, we're going to talk about the control theory, which is crucial part of any engineering, especially electronics and robotics, which are the part of biomedical engineering. We will start the lecture from reminding ourselves about the transfer functions which are touched in the first section briefly. Remember the transfer function of an RC filter, also, remember the second order RC filter where we cascaded two of them through a buffer. Here we're going to learn how to analyze those transferring functions and how to design effective controllers in order to improve their performance. First, let's remind ourselves how the first order transfer function looks like. If we apply the inverse Laplace transform, which we can simplify find in the standard table. We can see that the solution to the ODE or system response in time, is always structurally the same for any first order system and equals to some exponent multiplied by a coefficient. If the tau is positive, which is always the case for an RC filter, it is basically the decaying exponent, with the gain defining the starting point and time constant defining the rate of decay. As an example of second order transfer function, let's consider a mechanical system of a mass supported by a spring and a damper, essentially a shock absorber in the car. This system gives very good intuitive understanding of any second order system, as all of the constants have real physical meaning. First, we as usual write the equation of motion, which includes inertial force, Hooke's law for a spring and viscous damping, the one proportional to the velocity our first derivative of deflection. Here, external force is the input and the mass deflection is the output. The Laplace transform replaces all derivatives to the S multiplication, and some rearranging brings us to a transfer function for this system. Now let's define some constants and now we have this written in a standard form, gain, natural frequency and damping ratio. You can instantly see the amount of useful intuitive information you can get about the system just by knowing those constants. This function is known as a damped oscillator in that it produce harmonic sinusoidal oscillations which decay over time. This type of system appears everywhere in physics as well as in engineering even to the extent that some higher order systems are simplified to become second order just because it's so well understood. Another useful example for us is a servo motor. As you can imagine, those are used everywhere in robotics, and for us it is important as it is a key component for active prosthetics. Here we have the angle of rotation as the output and motor torque as an input which we can control by voltage occurring directly. It has viscous friction in the bearings and inertia. The ODE can be delivered through momentum balance equation and by taking Laplace, we can see that the transfer function has similar structure. However, there is no spring element. Several systems can be obviously combined together, and it is easy to see that a combined transfer function of a chain of several transfer functions can be found by symbol multiplication. The crucial component of the control theory is the feedback. As the name suggests, to organize the feedback, you need to measure the output, transform it somehow, and feed it back to the input. Remember the op-amp and the multitude of nice properties that we have achieved by doing so. In control theory, to describe this process, we add a summation element where we put plus or minus near the signal path to indicate whether we add it or subtract. In most cases, we tend to use negative feedback loops, which means we subtract the modify output signal from the input. The mathematics of computing the feedback of closed loop transfer function is also straight forward. By careful tracing of all the inputs and outputs, we can do basic algebra and arrive to the equation. Similar, single transfer function can represent any complicated system which involves electromechanical components, measurement of several parameters, and decision making integrated into continuous process control. For example, part of Tesla Autopilot, which measures GPS speed and acceleration in order to maintain constant velocity, can be gradually unwrapped into a second order transfer function. The rule here is to start working from the inner-most loop progressing outwards, handy. Remembering the transfer function of a servo motor, we can see how a simplest feedback of just subtracting unmodified output from the input changes radically it's transfer function. Now the system can oscillate as if it had an artificial spring, and we can control the frequency and damping ratio by adjusting the parameters, for example, gain, on the motor. The last bit to consider about the second order transfer functions is the generalized solution. If we look at the table of inverse Laplace transforms, we can construct the solution in time and see that it has a constant multiplied by exponent, which in turn is multiplied by a sinusoid. This lets us generalize the entire class of second-order system, be it car shock absorber, second order RC filter, or a servo mortar. The dynamic response contains an oscillatory behavior bound by exponential amplitude. If damping ratio is less than one, the solution is decayed soon, where frequency and the rate of decay is fully defined by the constants of the standard representation of the second order transfer function. You can see now the system step response, the usual measure of system dynamic performance, which we can easily compute knowing the transfer function and supplying step function to the input. The step response in Laplace domain is equal to a over s, where a is the step size. After multiplying, you can find the appropriate equations in the Laplace table or use digital Laplace transform to evaluate the output. The damping ratio here basically controls how fast the system is reaching the target, versus how many oscillations you will get after the kickoff? More generally, the roots of the denominator actually control this with standard classification of the system being under or over-damped exponentially bound oscillations, critically damped decaying exponent, or undamped constant oscillation depending on damping ratios.