Presentation on theme: "Introduction to Control Theory"— Presentation transcript:
1Introduction to Control Theory COMP417Instructor: Philippe Giguère
2Actuators Earlier lecture presented actuators Electrical motorNow how do we use them in an intelligent manner?
3Open-loop?We want to spin a motor at a given angular velocity. We can apply a fixed voltage to it, and never check to see if it is rotating properly.Called open loop.
4Open-loop? What if there is a changing load on the motor? Our output velocity will change!speed wno torque at max speedstall torquetorque t
5Closing the loop Let’s measure the actual angular velocities. Now we can compensate for changes in load by feeding back some information.
6Control Theory Roots in another science: Cybernetics Cybernetics is the study of feedback and derived concepts such as communication and control in living organisms, machines and organisations.Expression was coined by Norbert Weiner in 1948.
7Early Example of Feedback System James Watt’s “Centrifugal Governor” in 1788.Regulates the steam engine speed.
8Other Simple Examples Body temperature regulation If cold, shiver (muscles produce heat)If hot, sweat (evaporation takes away heat)Maintaining social peaceIf a crime is found (sensor), the guilty party is punished (actuator).Cruise control in carsYou set a speed, CC will increase fuel intake uphill, and decrease it downhill.Etc…
9Why Control Theory Systematic approach to analysis and design Transient responseConsider sampling times, control frequencyTaxonomy of basic controllers (PID, open-loop, Model-based, Feedforward…)Select controller based on desired characteristicsPredict system response to some inputSpeed of response (e.g., adjust to workload changes)Oscillations (variability)Assessing stability of system
10Characteristics of Feedback System Power amplificationCompare neural signal power (mW) vs muscle power output (tens of W)Means it is an active system, as opposed to passive.ActuatorFeedbackmeasurement (sensor)Error signalController
12Controller Design Methodology StartSystem ModelingController DesignBlock diagram constructionController EvaluationTransfer function formulation and validationObjective achieved?StopYModel Ok?NYN
13Control System Goals Regulation Tracking Optimization thermostat robot movement, adjust TCP window to network bandwidthOptimizationbest mix of chemicals, minimize response times
14Approaches to System Modeling First PrinciplesBased on known laws.Physics, Queueing theory.Difficult to do for complex systems.Experimental (System Identification)Requires collecting dataIs there a good “training set”?
15Common Laplace Transfom Namef(t)F(s)Impulse d1StepRampExponentialSineDamped Sine
16Transfer Function Definition: H(s) = Y(s) / X(s) Relates the output of a linear system to its input.Describes how a linear system responds to an impulse… called impulse response(remember! Convolving with impulse yields the same thing. Hence probing a system with and impulse is finding its transfer function…)All linear operations allowedScaling, addition, multiplication
17Block DiagramExpresses flows and relationships between elements in system.Blocks may recursively be systems.RulesCascaded elements: convolution.Summation and difference elements
24Second Order Response Typical response to step input is: overshoot -- % of final value exceeded at first oscillationrise time -- time to span from 10% to 90% of the final valuesettling time -- time to reach within 2% or 5% of the final value
33PID Tuning How to get the PID parameter values ? (1) If we know the transfer function, analytical methods can be used (e.g., root-locus method) to meet the transient and steady-state specs.(2) When the system dynamics are not precisely known, we must resort to experimental approaches.Ziegler-Nichols Rules for Tuning PID Controller:Using only Proportional control, turn up the gain until the system oscillates w/o dying down, i.e., is marginally stable. Assume that K and P are the resulting gain and oscillation period, respectively.Then, usefor P controlfor PI controlfor PID controlKp = 0.5 KKp = KKp = 0.6 KZiegler-Nichols Tuning for second or higher order systemsKi = 1.2 / PKi = 2.0 / PKd = P / 8.0
34Layered Approach to Control Robotic systems often have a layered approach to control:movie
35Multiple LoopsInner loops are generally “faster” that outer loop.
36Advanced Control Topics Adaptive ControlController changes over time (adapts).MIMO ControlMultiple inputs and/or outputs.Predictive ControlYou measure disturbance and react before measuring change in system output.Optimal ControlController minimizes a cost function of error and control energy.Nonlinear systemsNeuro-fuzzy control.Challenging to derive analytic results.
37RC Servo Is a controller + actuator in a small package. Not expensive 10$-100$.Those in 417 will use some of these.
38PWM PWM -- “pulse width modulation Duty cycle: Why: The ratio of the “On time” and the “Off time” in one cycle.Determines the fractional amount of full power delivered to the motor.Why:Transistor acts as a resistor when partially on.Leads to energy being wasted heat.