SE1CC11 – Feedback – Part A SE1CC11 Cybernetics and Circuits Feedback – Part A Dr Richard Mitchell SE1CC11 and SE1CA11 introduce fundamental concepts and applications of Cybernetics – Feedback theory, Artificial Intelligence and Robotics; and they cover Electronic Circuits and Computing. This year there are 5 lectures in Autumn, 10 in Spring on Feedback Assessment: Laboratory Practicals (see separate timetable) 3 hour exam with questions on Feedback, Circuits and Op-amps Note material used to be in SE1CA5/9 and SE1EA5 On Blackboard, Books, etc. Lecture Notes on Blackboard and directly on link from http://www.personal.reading.ac.uk/~shsmchlr/teach.htm This year we are not providing printed handouts – we expect you to download file with lecture notes and then add your own comments. There are some web pages available to help with course at http://www.personal.reading.ac.uk/~shsmchlr/javascript/index.htm “Custom book” ‘Cybernetics, Circuits and Computing’, Mitchell, Harwin, Cadenas, Gong, Potter and Warwick, Pearson, ISBN 978-1-78016-067-2 I have set up a ‘discussion board’ on Blackboard Feel free to ask a question or answer someone else’s Tutorial Questions to do on Blackboard – from week 2 2012/13 we reorganized the module - more Feedback less Circuits p1 RJM 17/09/14 SE1CC11 – Feedback – Part A © Dr Richard Mitchell 2014 Bring calculator to lectures p2 RJM 17/09/14 Feedback Syllabus SE1CC11 – Feedback – Part A © Dr Richard Mitchell 2014 Cybernetics – a Different Perspective Introduction to systems with feedback - show variety Kybernetes (Steersman) Block diagram analysis - show what feedback does Positive and Negative Feedback - and consequences Robots Systems with Limits - applications of inevitable limits Neural Nets Static and Dynamic Systems - dynamics and stability Learning Robot Frequency Response Analysis VR Computer Modeling of Feedback Systems Gaia Note, aim to cover these topics with minimal maths – though the Maths module you do reinforces the material All different + use feedback Feedback and System Analysis is also covered in lectures on operational amplifiers and circuit theory. Feedback also features in Artificial Intelligence and Robotics p3 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p4 RJM 17/09/14 Standard and Cybernetic Approaches Standard View: Aristotelian (Greek) - Cause & Effect Cause System Effect System Feedback Problems System more complicated - can lead to run away disasters The Open Loop View Prices Up + Cause The (practical) Cybernetic view : Closed Loop – Has Feeback SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Effect + Wages Up Note, signs – net sign round the loop is positive Reaction Arms race is similar – between countries and animals Not good – but can be useful for quick changes Irony: Cybernetics comes from a Greek Word! p5 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 However … p6 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 1 SE1CC11 – Feedback – Part A Feedback Advantages - for Control This will be illustrated by first considering the steersman Winds/Tides No control – like having eyes closed Course Boat Guess As Applied To Other Systems Winds/Hills Speed Control of Car (or other vehicle) Slow / Speed + Driver Winds/Tides With control – looking where you are going Obstacles Course Boat Left / Right - + p7 RJM 17/09/14 p8 RJM 17/09/14 Sun, PCs, People Heat / Cool - Temperature Negative Feedback produces ‘regulation’ – If output moves from desired feedback moves it back + Net sign round loop -ve Air Con/Boiler Positive Feedback produces change If output moves Sun, Illness, etc Of Human Body feedback moves it further Temperature Body Sweat / Shiver Poss run away - eg inflation, arms race A system with +ve and -ve can be good + Potentially quicker move from one Action p9 RJM 17/09/14 state to another state SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p10 RJM 17/09/14 For Instance, Daisyworld SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Daisyworld Continued Lovelock’s Imaginary world to demonstrate Gaia principle Namely that Life and Earth work together to mutual advantage Grey Planet - black/white daisy seeds in soil Daisies grow best at 22OC SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Negative and Positive Feedback Temperature Control Room + Joint Motors SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Of Rooms Position Robot Arm Turn Clock / Anti - Positioning Robot Gripper Steersman Net sign -ve Speed Car Growth Sun Once 7OC: daisies grow, Temperature Planet Black / heating or cooling, until too hot White Daisies No grow if < 7OC or > 37OC Temp 7 Daisyworld’s Sun is heating up 22 - like Earth’s What happens to planet’s temperature? p11 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 37 Temp C 37 if no life 22 7 if life Time p12 RJM 17/09/14 Note, for long period, temp constant – better if more species! SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 2 SE1CC11 – Feedback – Part A Learning – Another Feedback Process Learning is a feedback process: Inputs Each neuron sums products of each input and weight of connection For more advanced, need intelligent control .. Must learn Provide inputs, calculate outputs ‘You learn by your mistakes’ But must learn weights Trial and Error – used by our Robots / Babies Inputs So have training data Use feedback! Well done? Outputs Feedback Control fine for some simple systems. Do Task Neural Network Learning Like brain: have network of neurons Outputs Network Change Weights Better Way - + Learning Refiner Expected Outputs p13 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p14 RJM 17/09/14 Human Computer Interaction Cybernetics Is In Fact Not New Just positioning a mouse is a feedback process Watt Steam Engine Governor Ultimate HCI is ‘Virtual Reality’ Computer Move -ment - SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Controlling Speed of Steam Engine Image By affecting amount of steam from boiler to engine In fact governor borrowed from Wind Mills + Steam to engine Human Also, Augmented Reality - mixed real and virtual world, Tele-operation - remote control where operator given input to suggest he/she at remote location. Needs force feedback and touch – ‘haptics’ p15 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 First Man Made Feedback System Constant Flow into vessel starting at Sun up Height of water indicates time But need to ensure constant flow So have second vessel, with hole, which keep full …. valve from Boiler p16 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Some Other Examples Of Feedback If too hot, valve pushed up, air escape, pressure down Cooking Taste stew, if too bland, add salt, taste, …. Feedback Seismometer Small pendulum in coil, feedback stops pendulum moving Earthquake float regulator vessel clock vessel p17 RJM 17/09/14 Coupled to Steam Engine Pressure Cooker - control pressure 250 BC Water Clock: water supply Throttle Valve SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 Left / Right Position Pendulum - p18 RJM 17/09/14 Coil + Coil output is measure of Earthquake SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 3 SE1CC11 – Feedback – Part A 2: Modeling Feedback Systems Summary We have introduced the cybernetic principle of feedback Thus have demonstrated the principle of feedback And seen it in technological, animal & environmental systems And that it can be applied to many types of system “control and communication in the animal and the machine”, Wiener technological as well as animal and (briefly) economic Winds/Tides Next week we will look at more systems One example, a control system : the steersman Specifically control systems systems with inherent feedback Course Boat Left / Right and introduce the generation and analysis - + of models of feedback systems Steersman There is, however, a more instructive/useful form of block diagram In this lecture we introduce this and how to develop such diagrams p19 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p20 RJM 17/09/14 Classical Feedback Control System Block Diagram Components Often draw block diagram as follows Error Desired By way of explanation : these are components of block diagrams Disturbance Controller Device SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Actual A B X A Block : X defines how A becomes B: B = A*X Output (‘actual’), fedback, compared with input (‘desired’). A Comparison : subtract actual from desired (see + / - in ‘summer’) If Actual ≠ Desired have Error processed by Control block makes ‘Device’ change its ‘actual’ state. A C Take off : B = C = A A C B Summing Junctions : C B C B C=A+B B C=A-B C=A-B i.e. See what have got, if not what want, do something! Note A, B, C are signals (voltages, positions, speeds, etc) Device under control affected by external disturbance In Control System, Error = Desired – Actual; for instance p21 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p22 RJM 17/09/14 More Complete Diagram Developing System Models Actuator turns control signal to suitable form so can drive device. Sensor measures Actual, converts to form so can compare. Desired Disturbance Error Controller Actuator SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 To develop model: divide system into manageable parts Then bring together to form whole model. e.g. A bike. Legs Actual Device Chain Pedals Legs Speed Bike Speed Wheel Speed = Legs * Bike Wind Legs Sensor Speed Bike Human can try to ride at constant speed NB Feedback aim: Error = 0, so Measured Actual = Desired Fine if measurement correct, problematic otherwise e.g. if speedo’ says 30mph if doing 35mph or league tables p23 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 Legs Desired Speed p24 RJM 17/09/14 Human Bike Wind Actual Speed SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 4 SE1CC11 – Feedback – Part A Friction / Going Up Hill Another Example – a Mobile Robot Consider robot on different surfaces on the flat or up/down hills. Motors are connected to robot wheels – motors turn, robot moves If put robot on floor, friction between wheel and floor slows robot Friction is a force, Ff … smooth floor Ff = 1; carpet Ff = 3 … Friction with surface and robot’s weight act as disturbances. Motor Apply voltage v to motor force motor turns l Fw weight Simple Model: Robot speed O = k * v v O = speed k is constant – let it equal 0.125 v but.. SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p25 RJM 17/09/14 In Class Exercise C=50 0.125 Robot Speed – no control Ff - Fw l Friction+Weight Desired Speed Speed 0.125 SE1CC11 – Feedback – Part A © Dr Richard Mitchell 2014 p26 RJM 17/09/14 So if want robot to go at constant speed, when on different surfaces at varying angles, either keep adjusting v – or use control Motor v Suppose h is 1, l = 2, m = 0.2, F is 1 and c = 0.1 If v = 8, speed is 8 * 0.125 – 0.1 * (1 + 0.2*9.8*1/2) = 0.802 Robot – Illustration of need for control Controller c = 0.1 Reduces speed by c * this Speed is k * v – c * (F + m * g * h / l) If apply 8V, robot speed = 8*0.125 = 1 unit/s clockwise If v = -24V, motor speed is 1.5 unit/s anticlockwise, Ff + Fw Overall disturbance force = Ff + Fw Speed, O k = 0.125 If robot goes up slope, weight slows it Surface length l, up height h, mass m, g=9.8 Weight opposing motion Fw = m*g*h/l h c = 0.1 v h 0.1 Actual Speed Speed 0.125 Robot downhill – weight speeds up Speed is k * v – c * (F + m * g * h / l) Robot Speed – with control What is speed if v = 8, h = 1, l = 2, m = 0.2, F is 1 and c = 0.1 Speed is 8 * 0.125 – 0.1 * (1 - 0.2*9.8*1/2) = 0.998 http://www.personal.reading.ac.uk/~shsmchlr/javascript/robotSpeed.html p27 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Two tanks connected by pipe This is first of two examples of systems with inherent feedback and blocks of output = input * constant are not sufficient I Pipe has resistance - sets flow through it F O Tanks have capacity – sets rate height of liquid changes SE1CC11 – Feedback – Part A © Dr Richard Mitchell 2014 p28 RJM 17/09/14 Block Diagram of Tanks I Flow F = (I-O) / Resistance F O Hence, block diagram I Flow F means O rises I-O F Pipe Tank O Liquid flows due to difference in pressure at ends of pipe System reaches final state ‘steady state’, when signals constant This will be when F = 0, which is when O = I NB: summer does I – O: so signals I and O same type (units m) So difference in Height causes Flow through pipe p29 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 Flow F is volume moving at rate : units m3 / s p30 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 5 SE1CC11 – Feedback – Part A Analogous Systems Resistor-Capacitor System I Often same model can apply to two different system types Water system R E Voltage input, E, from battery. C water flows thru pipe as pressure difference across pipe pipe has resistance (affected by its size): restricts flow water flows into tank; means height of water increases speed at which height rises affected by tank’s capacity Output V, across capacitor V Voltage across Resistor, E – V, determines I I into capacitor causes V to increase E-V Electronic system E current flows thru resistor, as voltage difference across it I Res V Cap resistor has resistance – which resists current flow current flows into capacitor, so voltage across it increases speed of voltage rises affected by capacitor’s capacitance p31 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Final, Steady value, when V = E, then I = 0 E and V measured in volts V, I measured in amps A p32 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Blocks and Transfer Functions Simple Block A X X is Transfer Function B Some Examples Resistor V V (voltage) Defines how A becomes B Spring Sometimes call X the ‘gain’ : eg X = 10 B is 10 times A, B and A are signals of same type But X can change signal types – eg Resistor B (Current) = A (Voltage) * X (1/Resistance) V 1/R I V = 2V, R = 4Ω, then I = 2 * ¼ = 0.5A p33 RJM 17/09/14 Units Current Amps, Voltage Volts Resistance Ohms (Ω) 1/R in Siemens SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Force Mass F Extension x A Mass For a capacitor, current flowing in causes voltage out to increase V = V + amount due to I For motor, net Force means motor accelerates ie velocity changes Velocity = Velocity + amount due to acceleration (we hid that detail in robot example) Mathematically, ‘integration’ does this sort of operation Output = Output + amount * Input Hence blocks can include Integrators (output constant if input 0) Can also have blocks which reflect change : differentiation p35 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 x F Damper Dashpot (for friction) V F=k*x A 1/m F f R V=I*R F k v p34 RJM 17/09/14 I I = V * 1/R A = F * 1/m F=v*f SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 When Output NOT Input * Constant For water tank, the height of water increases when water flows in Height = Height + amount due to flow F I 1/R Examples Capacitor I 1/C V V = 1/C * Integral I V (voltage) Inductor I V (voltage) Mass F Mass v F L 1/m V V = L * Differential I v v = 1/m * Integral (F) Mainly we will consider these next term p36 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 6 SE1CC11 – Feedback – Part A Summary Lecture 2 After Class Exercise Thus we have seen different types of system, some designed for feedback, some with inherent feedback. Here robot shown on a less steep hill. Speed = k * v – c * (F + m * g * h / l) l h We have seen three different but analogous systems. We have looked at transfer functions of blocks a) Suppose h is 0.5, l = 2, m = 0.1, F is 1, c = 0.1 and v = 8 What is robot speed ? We have then said we can develop a model by sorting out the components and then combining. But how to combine? Next week we will see how that can be done, for a control system. We shall see that for a control system output may not equal input, but can be close … Before next week try following Exercise on Blackboard If going downhill, robot’s weight will speed it up : l Speed = k * v – c * (F - m * g * h / l) h b) For same values as above, now what is speed downhill? Go to Blackboard, module SE1CC11, find associated quiz and answer p37 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p38 RJM 17/09/14 3 : Analyzing Feedback Systems Reminder of Component Types We have introduced the cybernetic principle of feedback and modeled the Classical Feedback Control System A Error X is transfer function How signal A transferred to B B X aim - actual (output) equals desired (input) Desired SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Disturbance Controller Actual Device A A C B We can have models (transfer functions) of the components, but what is the overall model (or transfer function)? Let’s find out. p39 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 X But systems have combinations of such components. Can we combine for overall model or transfer function I Y If B = 0, C = A Then TF = 1 If A = 0, C = -B Then TF = -1 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 What of Feedback Control System ? First consider: two blocks in series B C=A-B p40 RJM 17/09/14 Analysis of Two in Series A B C=A+B To verify this (and to find out it’s not true!) we need to be able to analyse such feedback systems. C E C P O C E=I–O From what we have already said O=E*C*P B =A*X and So O = (I - O) * C * P C =B*Y =I*C*P–O*C*P C =A*X*Y O+O*C*P =I*C*P ie X and Y combined single block model A X*Y C O * (1 + C * P) = I * C * P But needed 7 lines of algebra ... Transfer Function X * Y p41 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 p42 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 7 SE1CC11 – Feedback – Part A Better : Forward over 1 Minus Loop Rule I E C Forward transfer function, I to O, D O P I E ignore (0) feedback signals: C * P I C P O I E (here I = 0, so O to E is -1) C P C O P Two + in second summing junction, so O = output of P + D I Forward = 1 O ‘closed loop transfer function’ p43 RJM 17/09/14 E If assume I = 0, Loop transfer function, ignore (set to 0) signals entering loop E to E (or O to O) LTF = - C * P What about Disturbances? SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 E I Loop same, so -CP D C E P D C P O O Thus p44 RJM 17/09/14 Complete Response SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 How good is system ? D I If assume D = 0, E C P If assume I = 0, O NO, as 1+C*P ≠ C*P In general, I and D wont be 0, so we combine both This is the principle of superposition (also used in circuits), so BUT, 1/1+CP ≠ 0 When systems operate, their values change (eg resistor) BUT, it will However, we can get close to what we want … p45 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p46 RJM 17/09/14 Let’s Put Some Numbers In SE1CC11 – Feedback – Part A © Dr Richard Mitchell 2014 Try with C = 50 and 500 ? Suppose C = 5 and P = 2 … let’s investigate If P changes by 10% to 2.2 O quite close to 1; One unit of D results in O changing by < 0.1; Conclusion – much better when C * P is big 10% change in P results in smaller 0.84% change … ok, can do better p47 RJM 17/09/14 SE1CC11 – Feedback – Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 p48 RJM 17/09/14 SE1CC11 – Feedback – Part A © Dr Richard Mitchell 2014 8 SE1CC11 – Feedback – Part A Numbers for complete model Lecture 3 In Class Exercise D E I O P C Suppose C = 27 P = 37 If C = 11, P = 9, I = 2 and D = 5; O = 99/100 * 2 + 1/100 * 5 = 2.03 a) Find 1 minus Loop If C = 500, P = 2, I = 1 and D = 4 This image cannot currently be display ed. This image cannot currently be display ed. b) Find O/I assuming D = 0 O = 1000/1001 * 1 + 4 / 1001 ~ 1 If (minus) loop gain (CP) high, response close to desired as c) Find O/D assuming I = 0 This image cannot currently be display ed. d) Evaluate O if I = 10 and D = -5 This image cannot currently be display ed. e) Find O/I if P changed to 40 p49 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p50 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Feedback Not Just for Control Control Engineers want O = I, Audio Engineers O = I * G D I X F A O Analysis Suppose Aβ >> 1 {much greater than 1} ‘negligibly large’, 1 – Aβ ~ Aβ More General Feedback System. Control system if A = C * P, = -1! (O is independent of A) e.g. if A = -5000, β = -0.2, Aβ = 1000, 1-Aβ = -999 ~ -Aβ If Aβ << -1, (large and negative) By Superposition: p51 RJM 17/09/14 This image cannot currently be display ed. A = -5000, β = 0.2, Aβ = -1000, 1 - Aβ = 1001, ~ - Aβ SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 SE1CC11 – Feedback – Part A © Dr Richard Mitchell 2014 p52 RJM 17/09/14 Also works .. Example – A = 100, = 0.21 Also works if Aβ << -1, (large and negative) e.g. if A = -5000, β = 0.2, Aβ = -1000, 1 - Aβ = 1001, ~ - Aβ O = -4.995 * I ~ -1/β * I, independent of A and O ~ 0*D Feedback good if modulus of Loop Gain, |Aβ |, large { modulus means size irrespective of sign: | 5 | = 5 |-5| = 5 } D I X F A O 1 - A = 1-21 = -20 β If I = 2, and D = 0, O = -5*2 = -10 Check: F = -10*0.21 = -2.1, so X = 2+-2.1 = -0.1; O = 100*-0.1+0 = -10 If I = 0 and D = 1, O = -0.05 * 1 = -0.05. Then O = I times -1/feedback value, is independent of A (and hence of changes in A) and unaffected by D. If loop gain smaller, result not as good … p53 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 Check: F = -0.0105 = X, so O = -0.0105*100+1 = -0.05 If I = 2 and D = 3; O = -5*2 + 3*-0.05 = -10.15 Check: F = -2.1315; X = -0.1315; O = -13.15+3 = -10.15 p54 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 9 SE1CC11 – Feedback – Part A Real System – in Electronics Operational Amplifier V i+ A Combine into a Complete System VO V i- V o = A * ( V i + - Vi - ) Potential Divider A very big, ~105, In use, put feedback round op-amp : Vi- found by potential divider = VI Suppose R1 = 9kΩ and R2 = 1kΩ Assume A very big, 105 Block Diagram for complete analysis VI VO Vm VO A V i- If R1 = 9kΩ and R2 = 1kΩ, Vm = Vo / 10 p55 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p56 RJM 17/09/14 Summary SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Lecture 3 After Class Exercise We have analysed simple feedback systems : D used forward over one minus loop for closed loop TF X I We have seen benefit of high loop gain F We have seen a practical (op-amp) circuit. O A Suppose A = 200, β = -0.2 We will extend the analysis next week a) Find O/I if D = 0 And consider positive and negative feedback b) Find O/D if I = 0 Before next week do following Exercise on Blackboard p57 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 c) Find %change in O/I if A changes by 10% to 220 p58 RJM 17/09/14 4 : More Feedback Systems Analysis We extend our analysis; show how computers can be used; and tackle the question of positive and negative feedback. D I E C P SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 ‘Fuller’ Control System Here we incorporate the actuator and sensor D I O E C A P O S For this feedback control system: use forward/1-loop Now Forward = C * A * P and Loop is - C * A * P * S If C*P big, O ~ 1*I + 0*D - what control engineers want If C*A*P*S big, O ~ I/S + 0*D – want S = 1 : true measurement p59 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 p60 RJM 17/09/14 SE1CC11 – Feedback – Part A © Dr Richard Mitchell 2014 10 SE1CC11 – Feedback – Part A Potential Divider is Feedback System! If more than one ‘loop’ ... Better control if feedback position and velocity : E I Vo = R2 * (I – IL), so D C P V IL Vs 1/R1 I O Vo R2 TF = Forward over 1 minus sum of each loop (-CP and –PV) Rule ok in this configuration – will return to multi loops later SE1CC11 – Feedback – Part A © Dr Richard Mitchell 2014 p61 RJM 17/09/14 p62 RJM 17/09/14 If more than one ‘Forward’ Put in an ‘anticipatory’ amount – so called feedforward control E E I F C Web Pages to help you learn http://www.personal.reading.ac.uk/~shsmchlr/javascript/index.htm There are many pages here which you should use throughout the module: just click on the appropriate link D P SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 O For Forward/1-Loop, follow link transfunc.html You are presented with various systems – select one listed under ‘Static Systems’ (dynamic systems are taught next term) Now ‘Forward’ has two paths F*P and C*P, sum each Forward eg Control, General Feedback, Control + VelFb, Op-Amp, etc You can investigate O/I or O/D You see Forward, press Next for Loop, press Next for Overall You can change values of parameters for C, P, etc… You are strongly recommended to investigate this page p63 RJM 17/09/14 SE1CC11 – Feedback – Part A © Dr Richard Mitchell 2014 p64 RJM 17/09/14 Positive/Negative Feedback Lecture 4 - In Class Exercise For system with feed-forward control : SE1CC11 – Feedback – Part A © Dr Richard Mitchell 2014 We will correct erroneous definitions / claims often made. Wrong to say negative feedback because - sign in ‘summer’ (Changing sign of has same effect as changing + to -) The important point is to have both a) claims for what negative feedback does b) a consistent definition for negative feedback To that end the correct view is that Negative Feedback a) reduces effects on output of disturbances reduces effects on output of parameter changes b) occurs if |closed loop gain| < |open loop gain| NB | x | or modulus of x, means size : ignore sign p65 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 p66 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 11 SE1CC11 – Feedback – Part A Negative Feedback (Harold Black 1930s) Forward (Open Loop) Gain = A Negative Feedback & Disturbances D I O A F Negative Feedback | Closed Loop Gain | < | Open Loop Gain | Negative Feedback, when | 1 – Aβ | > 1, Reduces effect of Disturbances D on output O Reduces effect of changes in A on output O p67 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p68 RJM 17/09/14 … and Changes in Parameters SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Interest Only: A → A(1 + ) Let A change by a small proportion: call it : i.e. A := A(1 + ) Feedback reduces the effect of change in A if |1 - A | > 1. Let A = 5 and β = -4 (-ve fb) and A change by 10% to 5.5 ie δ = 0.1 Rel Change: open loop = 0.1; closed loop = 0.1/21 = 0.005 (smaller) If instead β = 0.04 (+ve fb) Rel Change: open loop = 0.1; closed loop = 0.1/0.8 = 0.125 (bigger) p69 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p70 RJM 17/09/14 Effect of Changing A : 50 to 55 β= a) -1/50 β 1-Aβ b) -1/10 c) 1/100 Graphs for b) : A = 50, β = -0.1 d) 3/100 e) 1/10 % diff 1/2=0.5 50/2=25 55/2.1= 26 +4% b -1/10 1/6=0.17 50/6=8.3 55/6.5= 8.5 +1.5% 55/0.45= 122 +22% c 1/100 1-0.5=0.5 1/0.5=2 50/0.5=100 d 3/100 1-1.5=-0.5 1/-0.5=-2 50/-0.5=-100 55/-0.65= -84.6 -15% e 1/10 5 -/-4=-12.5 55/-4.5= -12.2 1-5=-4 1/-4=-0.25 b) highest loop gain: best at rejecting D & changes in A. No system has high loop gain. c) and d) have +ve feedback: O/D > 1 and % diff > 10% p71 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 It can be useful to plot graphs of O vs I and O vs D a -1/50 1+1=2 1+5=6 Can also do by differentiating closed loop TF w.r.t A SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 -2% As straight lines … associated system is said to be linear If gradient of O/D < 1 : system has negative feedback p72 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 12 SE1CC11 – Feedback – Part A Analysis Using MATLAB Using MATLAB on Control Systems MATLAB is an interactive package that you will use in labs, etc >> C = 11; P = 9; I = 2; D = 5; It processes matrices, which have one or many numbers >> O = I * (C * P) / (1 + C * P) At the prompt (>>) you can type commands to O= assign values to variables, and/or to perform calculations 1.9800 call functions provided by MATLAB or ones you write (like C) >> O = D / (1 + C * P) plot graphs, etc O= You can define a suitable graphical interface … NB 35 is a number [35, 8, 1, -8] single row vector (matrix) 4 columns [35, 67; 89, 88; 3, -1*5] 3 row 2 column matrix (; for new row) p73 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Or to see effect of change in P >> C = 50; P = 2; Pa = P * 1.1; >> OoverI = C * P / (1 + C * P) OoverI = 0.9901 >> OoverD = 1 / (1 + C * P) OoverD = 0.0099 >> OoverIa = C * Pa / (1 + C * Pa) OoverIa = 0.9910 >> PCchange = 100 * (OoverIa - OoverI) / OoverI PCchange = 0.0901 p75 RJM 17/09/14 0.0500 >> O = I * (C * P) / (1 + C * P) + D / (1 + C * P) SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Summary O= { could extend easily to cope with V in multi loop system, or F for feed forward } 2.0300 p74 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Can Write MATLAB Function – and call it function FBSys (C, P, pc); % store in file fbsys.m % FBSYS (C, P, pc) % Analyse system with gains C and P noting effect if P change by pc%, % Dr Richard Mitchell 12/7/05 den = (1 + C * P); % calculate values OoverI = C * P / den; OoverD = 1 / den; Pa = P + P * pc/100; % find new P OoverIa = C * Pa / (1 + C * Pa); % find new O/I [OoverI, OoverD, OaoverI, 100*(OoverIa-OoverI)/OoverI] % put values in matrix and print >> fbsys(50, 2, 10) 0.9901 0.0099 0.9910 p76 RJM 17/09/14 0.0901 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Lecture 4 After Class Exercise We have analysed feedback system : A and CP I We have briefly noted multiple loops We have an appropriate definition of negative feedback X F We have shown that can plot graphs of O vs I and O vs D A O β These are straight lines … means systems are linear. NB Principle of Superposition only true for linear systems Next week we build on this … and consider limits … which make systems non-linear Before next week do following exercise on blackboard p77 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 Here, I = 2, A = 10. Find O and state whether positive feedback if: a) β = -1 b) β = +1 c) β = -0.02 d) β = +0.02 p78 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 13 SE1CC11 – Feedback – Part A 5 : Feedback Systems and Limits Limits Signals cannot be infinite … they are limited … we determine effect. D Recall last week’s system with A = 50, β = -0.1 I X 1 - Aβ = 1+5 = 6 F A O O/I graph implies that as I increases, so O increases Not true in practical systems e.g. output of a component can’t exceed its power supply, etc The output has limits; and we can incorporate them. Below are shown limits graphically and as a block diagram Out +L Limit Block In In Straight line graphs – system is linear Out If -L ≤ In ≤ L, Out = In; |1 - Aβ| > 1 : -ve fb if In < -L, Out = -L; if In > L, Out = L p79 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p80 RJM 17/09/14 Limits in Feedback Systems D I +L -L X F A Y -L +L Z O Let A = 50; = -0.1; +L = +25 and -L = -25. SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 What happens when pass Limit? A = 50 D I = -0.1 X L = 25 A F At limit Y -L +L Z O I = 3, O = 25 Consider O vs I assuming D = 0. If I increases, X and Y increase, but Z and O stay at 25 When no limiting, limit box transfer function = 1. Use same argument for limit -25; or say ‘by symmetry’ when I = -3, O = -25, if I more –ve O stay -25 Hence (non linear) graph of OvI p81 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 General Case – and other example p82 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 O vs D : a different response D I X F A Y -L +L Z O Suppose A = 100; β = -0.1 +L = 10 and –L = -10 System linear when -10 ≤ Y ≤ 10, then Strategy, find D when just limit: Y = Z = +L: when Do similarly for when Y = Z = -L : or use symmetry p83 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 p84 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 14 SE1CC11 – Feedback – Part A So, when A = 100; = -0.1 Lecture 5 In Class Exercise D I X Y A F -L O +L Z A = 1000 = -1/5 +L = 20 -L = -20 Calc O & D at L = -20 to label the graph Then, if D ↓ 1 to -12, O = -12 + 10 = -2. ie O ↓ 1 : O/D now 1 By symmetry, Y = Z = -10 when D = 11; If D then ↑ 1 to 12, O up by 1 If -11 ≤ D ≤ 11, effects of D on O reduced by feedback, otherwise no feedback, no reduction. p85 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p86 RJM 17/09/14 Limits and Hole in the Ozone Layer SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Limits when have Positive Loop Gain We will now see different response when loop gain > 0 … The ozone layer is a feedback system X I Must be (according to Gaia) so correct amount of u.v. getting to Earth’s surface: F Too much u.v → cancer; too little → rickets If ozone layer too thin, u.v. gets through : finds oxygen; turns it to ozone, thickens ozone layer: feedback! Worked til too much CFC – which destroys ozone CFCs are disturbances, and normally feedback reduces effects of CFCs But when too much, system not cope as then has no feedback to reduce any extra disturbance 100 Y +10 O -10 0.1 Suppose O = 10 and I = 1; F = 1, X = 2, Y = 200, so O = 10 If I reduced to -0.9: X = 0.1, Y = 10, O = 10 No change. If I now -0.91: X = -0.91+1 = 0.09, Y = 9, O = 9 Then X = -0.01, Y = -1, O = -1 And then X = -1.01, Y = -101, O = -10 Very rapidly, O flipped +10 to -10 when I passed -0.9. p87 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p88 RJM 17/09/14 How to Flip Back Limits and Positive Loop Gain I X F 100 Y +10 O -10 0.1 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 If, however, I upped to 0.91, X = I + O/10 = -0.09 O = 100 * X = -9 Then X = 0.01, O = 1; Then X = 1.01, Y = 101, O = 10 O Thus, when I exceeds 0.9, O flips back to + 10 This change from +10 to -10 is represented graphically as O 0.9 If I reduced now no change. I O But if I increased to 0 -0.9 I X = -1, O = -10 still Even if I upped to +0.9: X = -0.1, O = -10, still, but.. p89 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 O stays at 10 until I again < -0.9. O depends on I and on O! -0.9 0.9 I Hysteresis: figure to right p90 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 15 SE1CC11 – Feedback – Part A Application: Square Wave Generator How To Find I Where O Flips I X F 100 Y +10 O -10 0.1 Again find I when system just limits, To introduce dynamic systems – consider simple use of integrator NB if input to integrator is constant, output changes at constant rate -C ∫ ie Y = O = 10 I X Y 100 +10 -10 ‘hysteresis’ loop input, O I = -C * ∫ O 0.1 I changes at rate -CO t = 0, I = +Flip, O = +Lim As O > 0, I is integral of –ve constant, so I decreases At time t, I = Flip - C*Lim*t If I ≥ -0.9, O stays at 10, but if I < -0.9, O will flip to -10 Input to ∫ C*Lim (>0), I increases constantly Could be found by same analysis. At t = 4*Flip / C*Lim, I = +Flip, O := +Lim SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 p92 RJM 17/09/14 MATLAB Code to Plot Limits [-lim, -lim, lim, lim, lim, -lim, -lim]); elseif whatplot == 0 % -ve loop gain – plot O/I plot ([-Ilim-5, -Ilim, Ilim, Ilim+5], [-lim, -lim, lim, lim]); else % -ve loop, plot O/D Olim = lim / (A*b); % O when just limits Dlim = Olim * OmAb; % D when just limits Example Output + General Summary Graphs A = 100, β = ± 0.1, lim = 10 10 5 0 -5 -10 10 5 0 -5 -10 5 O function fblims (A, b, lim, whatplot); % plot limit system OmAb = 1 - A*b; % 1 minus A * b Ilim = lim * OmAb / A; % value of I when just limiting if A*b > 0 % +ve loop gain – plot hysteresis plot([-Ilim-5, Ilim, Ilim, Ilim+5, -Ilim, -Ilim, -Ilim-5], ... 4*Flip / C*Lim SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 O p91 RJM 17/09/14 I At t = 2*Flip / C*Lim, I = -Flip, O := -Lim O By symmetry, I must exceed +0.9 for O to flip to +10 O 0 -5 0 Aβ < 0 I -5 5 -10 0 D 10 -5 0 I 5 Aβ > 0 plot([-Dlim-5, -Dlim, Dlim, Dlim+5], [-Olim-5, -Olim, Olim, Olim + 5]); end p93 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Summary We have seen effect of limits on feedback systems p94 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 Lecture 5 After Class Exercise D I If negative loop gain, get different responses O/I O/D X F For positive loop gain, get hysteresis A Y -L +L Z O Saw how with integrator, could make square waves Next term We start to consider dynamic analysis Where we will use integrators more and (building on what you will learn in circuits), √-1 Before next week, try following exercise on blackboard p95 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 © Dr Richard Mitchell, 2014 Suppose A = 100, = 0.2, +L = 50, -L = 50. Initially, I = 0 and O = -50. a) What must happen to I to make O change to +50 b) What must then occur to I for O to return to -50? p96 RJM 17/09/14 SE1CC11 Feedback - Part A © Dr Richard Mitchell 2014 16

© Copyright 2017 ExploreDoc