AMME1705 Introduction to Electromechanical Systems Live Lecture/Tutorial Week 8 The University of Sydney Page 1 https://i.ytimg.com/vi/5nwNKPs2gco/maxresdefault.jpg Quiz details for week 9 what is involved? This is a quiz about sensors and signals (content before motors). As with the week 6 quiz, high level questions about the lecture content (as in similar style to the weekly quizzes). More detail about lab 2 (mostly the first two weeks as there are still people waiting to complete the 3rd week of lab 2). The University of Sydney Page 2 Week 8 - Admin Group A – no lab Group B this week is Simulation week for lab 2 in-person: please attend your timetabled lab session Do the prework! otherwise it will likely be a struggle to finish and demo in lab time. Quiz Week 8 is due today! The University of Sydney Page 3 Week 9 - Admin Before your marking Lab Upload a single document of your lab book! Your tutor will check that the file is there before marking. After the marking session, you need to upload your shared document. The University of Sydney Page 4 https://edstem.org/au/courses/20547/discussion/2579824 source The University of Sydney Page 5 Outline – Review of Week 7 quiz – Summary – Transistors – PWM – Control The University of Sydney Page 6 Review of week 7 quiz π ~ 0.63 π = RC π = 1K x 100u π = 1000 Ω x 0.0001 f π = 0.1 seconds The University of Sydney Page 7 Review of week 7 quiz π ~ 0.63 π = RC π = 1K x 22u π = 1000 Ω x 0.000022 f π = 0.02 seconds The University of Sydney Page 8 Review of week 7 quiz This is a high-pass filter circuit, where: •The capacitor blocks DC and passes higher frequencies •The resistor completes the path to ground, allowing voltage to be observed across it The University of Sydney Page 9 Review of week 7 quiz For capacitors in parallel, the total (equivalent) capacitance is: Ceq=C1+C2 Ceq = 940 uF For capacitors in series, the total (equivalent) capacitance is given by: 1/Ceq=1/C1+1/C2. Ceq= 235 uF The University of Sydney Page 10 Review of week 7 quiz For inductors in series, the total (equivalent) inductance is: Leq = L1+L2 Leq = 200 mH For inductors in parallel, the equivalent inductanceβ is given by: 1/Leq=1/L1+1/L2 Leq = 50 mH The University of Sydney Page 11 Where are we up to ? Basic electronics Sensors and signals What is a motor, and what makes it spin β open-loop vs closed-loop control (basic ideas so far) Final lab Provide power to, and make a closed loop motor controller (we already have the main ideas sorted !) The University of Sydney Page 12 Weekly plan (remainder of the semester) Week 7 Making things move (DC motors and interfaces) Week 8 Delivering power (PWM and transistors) <mid semester break> Week 9 Tuesday 12pm - Quiz "Sensors and Signals" Week 10 Power supplies (AC/DC, different types/options, failure modes) Week 11 Other things that move (AC, servos , solenoids) Week 12 Circuit analysis and review of the UoS. Week 13 Tuesday 12pm - Quiz "Putting it all together" The University of Sydney Page 13 Delivering power provide the right amount of power to a device ideas include: - switching power on/off - how much power can be delivered - what devices can control this power The University of Sydney Page 14 Mechanical Switches + Provide physical isolation of the circuit. - Can be noisy - takes some time to perform the action. The University of Sydney Page 15 Transistors A transistor is an electronic component that can control the flow of electricity. When used as a switch, it can turn a device (like a DC motor or LED) on or off, just like a regular mechanical switch, but with no moving parts. Speed: Transistors can switch on/off very quickly, thousands of times per second or more. Automation: They can be controlled by tiny signals (like from a microcontroller), so they’re perfect for automated systems. Durability: No moving parts = less wear and tear. The University of Sydney Page 16 Transistors There are many kinds, but the slide mentions two main types: • BJT (Bipolar Junction Transistor): • Controlled by current at the base pin. • Good for simple, low-power switching. • FET (Field-Effect Transistor): • Controlled by voltage at the gate pin. • More efficient for switching large currents, especially in power electronics. The University of Sydney Page 17 Transistors BJT BJT stands for Bipolar Junction Transistor. It’s one of the most common types of transistors used in electronic circuits to: • Switch things on and off (like motors, LEDs) • Amplify signals (like audio or sensor readings) Three terminals (NPN) - Base (b) – Control pin - Collector (c) – Current flows in - Emitter (e) – Current flows out The University of Sydney Page 18 Transistor BJT NPN (most common) • Turns ON when the base is given a positive voltage (typically >0.7V). • Current flows from collector → emitter. PNP • Turns ON when the base is pulled low (more negative than the emitter). • Current flows from emitter → collector. The University of Sydney Page 19 Transistor BJT The University of Sydney Page 20 BJT motor control https://www.tinkercad.com/things/jxhpjUgqSgu-bjt-motorcontrol The University of Sydney Page 21 Transistors FET FET stands for Field-Effect Transistor. It’s another transistor type, but it works differently from BJTs. While BJTs are controlled by current into the base, FETs are controlled by the voltage applied to their gate terminal. They don’t require much current, which makes them more efficient for switching. The University of Sydney Page 22 Transistors FET Just like BJTs, FETs have three terminals: 1. Gate (G) – the control pin 2. Drain (D) – where current enters 3. Source (S) – where current exits You control a FET by applying voltage to the gate: • Apply the correct voltage to the gate β FET turns ON (conducts between drain and source) • Remove the voltage β FET turns OFF The University of Sydney Page 23 Transistors The University of Sydney Page 24 FET motor control https://www.tinkercad.com/things/6xqNCXaz83E-fet-motorcontrol The University of Sydney Page 25 Pulse Width Modulation (PWM) PWM stands for Pulse-Width Modulation. It’s a technique for controlling the average power delivered to a device, by rapidly switching it ON and OFF. Instead of just sending a constant voltage, PWM sends pulses. The length of time the signal is ON vs. OFF in each cycle is called the duty cycle. The University of Sydney Page 26 PWM – Parameters Frequency: How fast the PWM is switching (e.g. 1 kHz = 1000 cycles/sec) Duty Cycle: How much of one cycle is ON (expressed as a percentage) The University of Sydney https://exploreembedded.com/wiki/images/5/54/0_LPC1768_PWM.gif Page 27 Pulse Width Modulation (PWM) - Frequency Frequency in PWM is how fast the signal switches between ON and OFF in one second. It's measured in hertz (Hz). The frequency you choose affects how the load (motor, LED, etc.) responds. LED -> Visual perception Motors -> Smooth Operation The University of Sydney Page 28 Pulse Width Modulation (PWM) If you're using a 5V PWM signal: – 50% duty cycle → average voltage is 2.5V – 80% duty cycle → average voltage is 4V – 10% duty cycle → average voltage is 0.5V The University of Sydney Page 29 Arduino ‘analog’ output https://www.tinkercad.com/things/dQnD69zTzWg-arduinopwm-output The University of Sydney Page 30 Demo – LED The University of Sydney Page 31 Demo - Motor The University of Sydney Page 32 Control – Concept Influencing how a system behaves to achieve a desired result. You press the gas pedal in a car to speed up (you're controlling the engine). A thermostat controls room temperature by turning heating on/off. A microwave controls time and power to heat food. The University of Sydney Page 33 Control – Open loop An open-loop system sends a signal to a device without checking if it worked. It does not adjust or react to changes in the environment or output. Pros & Cons: • Simple and cheap • Not accurate under changing conditions • Can’t respond to disturbances https://media2.giphy.com/media/pNS3r79hWjZpH0gGTF/200w.gif?cid=6c09b952v2dwpt2ues3vu druf1lam60ffv722hpfaqu8piat&ep=v1_gifs_search&rid=200w.gif&ct=g The University of Sydney Page 34 Control – Close loop A closed-loop system uses feedback from sensors to monitor the output and then adjusts the input to correct any errors. Pros & Cons: • Accurate and self-correcting • Can adapt to disturbances or changes • More complex and may need tuning The University of Sydney Page 35 Control – Components A typical control system consists of: 1. Sensor – measures what’s happening 2. Controller – decides what to do 3. Actuator – carries out the decision 4. Setpoint – the desired goal 5. Feedback – compares actual output to desired output The University of Sydney Page 36 Temperature Control Let’s say your cat, Walnut, loves to nap when the room is exactly 25°C. This is your goal — the setpoint. 25°C The University of Sydney Page 37 Temperature control You use a temperature sensor (like a thermometer or thermostat) to measure the room’s current temperature. You check the sensor. If it’s too hot or cold, you decide what to do. You use an actuator to actually change the environment: - Turn on the heater if it’s cold - Turn on the fan or A/C if it’s hot The University of Sydney Page 38 Temperature control After adjusting the temperature, check again. This feedback loop continues until Walnut’s content. The University of Sydney Page 39 Bang Bang controller A Bang-Bang controller (also called on-off control) is the simplest type of control system. It has only two states: ON (full power) or OFF (no power) — like a light switch. There’s no in-between, no gradual adjustments. It's like saying: – “If it’s too cold, turn the heater ON. If it’s warm enough, turn it OFF.” The University of Sydney Page 40 Bang Bang controller Pros of Bang-Bang Control • Super simple to implement • No need for complex math or tuning • Good enough for basic control systems Cons of Bang-Bang Control • Causes oscillation (system keeps bouncing back and forth) • Not energy-efficient (always full power) • Can wear out components with rapid ON/OFF switching • Not good for precision control The University of Sydney Page 41 Control systems A bang-bang controller would be unstable and uncomfortable – A servo would oscillate between full speed forward and full speed reverse – Cruise control would be jerky Ideally, would like to have a control action that depends on how close to the set point you are – Large acceleration when far from the desired set point – Small acceleration when almost at the desired set point The University of Sydney Page 42 P = Proportional Control This part responds based on the size of the error: Error=Setpoint−Actual Temperature Bigger error = bigger correction. PRO: Simple and fast CON: Might overshoot The University of Sydney Page 43 P = Proportional control i.e. speed sensor reads 0.5V, desired is 2.5V control voltage = Kp * (2.5 - 0.5) Note: A large value of Kp is a bang-bang controller A large gain is similar to why the open loop op-amp acts as a comparator The University of Sydney Page 44 P = Proportional control The idea is pretty simple - you have a system such as a motor that you want to make go a particular speed (that you can measure) - If the motor is not going fast enough, you want the voltage to be higher - If the motor is going too fast, you want the voltage to be lower The University of Sydney Page 45 P = Proportional control The idea is pretty simple - you have a system such as a motor that you want to make go a particular speed (that you can measure) - You need to measure the difference between how fast you want to go, and how fast you are currently going, and multiply this value by how forceful you want the controller to be. The University of Sydney Page 46 P = Proportional control A range of Kp values The University of Sydney Page 47 Integral control Proportional control cannot reach the actual set point – Approach the set point, the error gets smaller and smaller – The control action approaches zero – Not enough to force the system the last bit of the way – Friction, inertia, noise, etc This generally leads to a steady state error The University of Sydney Page 48 I = Integral control Take the error and add it up over time, it gets bigger the longer the error exists – Use this summed error as an additional control action – The longer the error exists, the more the controller will push toward the set point – The sum is generated by integrating the error Control action += Ki * integration of error The University of Sydney https://controlguru.com/wp-content/uploads/2015/08/piintbig.jpg Page 49 I = Integral control There are some challenges: – Choosing the best value is not easy – The integral term can lead to overshooting and oscillation If only there was a way we could limit the rate of change of the signal ? The University of Sydney Page 50 D = Differential control Differential control is a control action that punishes fast changes in the measured error – The control action is proportional to the change in error – A positive change in error leads to a negative control action which dampens the system The University of Sydney Page 51 PID control PID = Proportional Integral Differential Put this together and you have probably the most common control strategy using in many, many devices - Good because it is simple, very fast to compute - Can do this using only op amps (no microcontroller)! Control action = Kp * error + Ki * accumulated error + Kd * change in error The University of Sydney Page 52 Demo https://www.luisllamas.es/en/pid-controller-simulator/ The University of Sydney https://content.spiraxsarco.com/-/media/spiraxsarco/global/learn-about-steam/8---control-applications/fig-8-35.ashx?h=455&w=900&rev=dc1be3fa69074e758c0117f8bdd54e05&hash=2E415A6A4681B493A4BEDABDF0CC3F82 Page 53 Lab 3 - Driving a motor In the next lab, we will be doing this using the arduino as the controller. We will drive the motor using PWM from the analog output of the arduino, and make an encoder to measure the speed from which we can determine the control action. The University of Sydney Page 54 Analog output only with ~ The University of Sydney Page 55 The University of Sydney Page 56
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )