Presentation is loading. Please wait.

Presentation is loading. Please wait.

ET 438b Department of Technology Southern Illinois University Carbondale et438b-1 1.

Similar presentations


Presentation on theme: "ET 438b Department of Technology Southern Illinois University Carbondale et438b-1 1."— Presentation transcript:

1 ET 438b Department of Technology Southern Illinois University Carbondale et438b-1 1

2 2 Set point Error Controller Sensors Feedback Plant Control Output - + Summing (error generation) Integration (integral control) Differentiation (derivative control) Amplification (proportional control) Analog Controllers Controller implemented with analog electronics (OP AMPS)

3 et438b-1 3 Digital Controllers Analog-to- Digital Converter Controller Digital–to- Analog Converter Plant Control Output Sensors Feed Back Set point + - Error Characteristics Analog Inputs and outputs Continuous signals converted to digital values Controller - Implemented with microprocessor System control variable modified by mathematical functions + - x / Result converted to analog signal by digital-to-analog conversion

4 et438b-1 4 Advantages Can implement complex control algorithms along with P-I-D Software-based controller Direct input of digital sensors Challenges Need Analog-to-Digital (A/D) Conversion- World is analog High speed sampling required for rapidly changing signals Precision of converted value. Infinite number of values mapped to a finite number of bits Must reconstruct most signals to analog for output to analog world. Need DAC (digital-to-analog converters)

5 et438b-1 5 Use computers to gather data, process data, and control system: Higher level control Monitored Systems Computer System with data acquisition Analog Outputs DACs Analog Inputs ADCs Digital In/Out Application Program Transducers (Sensors) Signal Conditioning Analog Input Signals Analog Output Signals Digital Signal Conditioning

6 et438b-1 6 Control of a staged processes with discrete steps. Examples around the home Washing Machines Dishwashers Time-driven sequential processes Cloths Dryers All processes driven by timing of the events

7 et438b-1 7 Event-Driven Sequential Processes Next step of process can not take place until an external event occurs Robotic Arms Motion sequence depends of position of mechanical part Sensors are switches that Indicate position Examples

8 et438b-1 8 LabVIEW is a graphical programming language that allows rapid development of programs that: Read analog input signal data Process and store data Display data and system status Read switch input (digital) signal data Write analog output signals Write digital output signals for on/off control

9 et438b-1 9 Compact Florescent Light Testing Controller Analog inputs read lamp currents Digital outputs control lamp operation Plot monitors lamp voltage over time Analog samples processed to give RMS V and I values

10 et438b-1 10 LabVIEW is a graphical programming environment Create user interface here Front Panel Block Diagram (back panel Create program here Controls and Indicators Palette Palette changes to programming functions when you click on block diagram

11 et438b-1 11 Tool Palette Program Control Run/Stop Pause Operate Value Pointer Text Wiring Debug Tools

12 et438b-1 12 In LabVIEW Input variables = controlsOutput variables = indicators Numeric Controls Numeric Indicators Boolean Controls Boolean Indicators

13 et438b-1 13 Other data types in LabVIEW Integers (Signed and Unsigned) I32 I16 I8 U32 U16 U8 Arrays Collect data of the same type. 1-D and multi-D Indexing begins at 0 Clusters Collect data of dissimilar data types. Only include indicators or controls Data Structures in LabVIEW Programming Strings Arrays of characters

14 et438b-1 14 Data Types and Structures in LabVIEW Programming Array of Float Point Array Icon Integer I32 and U32 Integer Icons String Control String Icon Array of Integers Integer Array Icon Cluster

15 et438b-1 15 FOR Loop – Repeats enclosed instructions for a predetermined amount of iterations (N) WHILE Loop – Repeats enclosed instructions until stop condition is met Index, i, in both structures holds current iteration number Graphical Programming Structures Stop Condition

16 et438b-1 16 IF-THEN/CASE Executes enclosed based on logical test (TRUE/FALSE) or Index (CASE) Graphical Programming Structures Logical test connects here TRUE condition executes these items FALSE condition executes these items This is how the structure looks on the block diagram

17 et438b-1 17 Computed nodes, when written code is simpler MathScript Node Write code in syntax similar to Matlab. Define I/O variable. Allows error checking from other blocks. Error in Error Out Formula Node Write code in syntax similar to C. Define I/O variable like MathScript

18 et438b-1 18 Define Input/Output Variables and Design User Interface Define and/or Select Data Collection and Control Channels and Tasks Program Functionality Control and Data Acquisition Programming

19 et438b-1 19 Define the I/O and design the interface Place the programming blocks on back panel Wire the programming blocks on back panel to make a functional program See more programming examples on the course website and in D2L

20 et438b-1 20 Overview of Data Acquisition and Control Program Structure Hardware NI-6024 NI 6221 Measurement and Automation Explorer LabVIEW Program Define I/O Tasks and channels

21 et438b-1 21 Define Types of Signals to Measure Connecting to the outside world with Measurement and Automation Explorer (MAX) Analog input signals Transducer inputs (V, I) Digital inputs signals Binary inputs Switches Create Measurement Channels and Tasks Using (MAX) Analog input signals Differential, Ground Referenced Digital inputs signals Ports (8-bits) Digital lines (1-bit) Access Channels and Tasks Using DAQmax in LabVIEW Analog/Digital Read/Write Single/Multi-sample

22 et438b-1 22 Reading Analog Inputs Reading Digital Inputs Access the DAQ functions from the Measurement I/O choice on the programming palette Polymorphic Virtual Instrument (VI). Click to change nature.

23 et438b-1 23 Ideal OP AMP Model A v = 200,000 R i = 1-2 M  R 0 = 75  I 1 = I 2 = 80 nA f c =1.5 MHz Parameters Idea Voltage Gain: A v = infinite Input Resistance: R in = infinite Output Resistance: R o = 0 Input I: I 1 =I 2 =0 Cutoff Frequency, f c :infinite Typical (LM741)

24 et438b-1 24 Non-idea OP AMP parameters and characteristics Slew rate - maximum rate of change of output voltage for large changes in the input voltage. Typical value - 0.5 V/  S = 500,000 V/s Output offset voltage - voltage on the output when both of the inputs are grounded. Typical value - 2 mV (LM741) Gain-Bandwidth Product-rate of frequency roll-off for OP AMP without feedback. Frequency at which the open loop gain of the OP AMP is 1 (0 dB). Typical 1 MHz (LM741) Applies to small signal level changes.

25 et438b-1 25 Determine the frequency limit due to slew rate limiting. Assume sine input and determine the rate of voltage change, dV/dt Maximum rate of change in sine occurs at t=0, so set t=0 in derivative to find f max Example dv/dt = 500,000 V/s, V p = 10 V Found in OP AMP Data Sheets

26 et438b-1 26 Gain-Bandwidth Product=GBP Open loop frequency response GBP = (Gain)(Input Frequency) = 1 MHz Find max frequency for 20 dB gain:1 MHz/10 (20/20) = 1,000,000/10 = 100 kHz Find max frequency for 40 dB gain: 1 MHz/10 (40/20) = 1,000,000/100 = 10 kHz Find max frequency for 60 dB gain: 1 MHz/10 (60/20) = 1,000,000/1000 = 1 kHz

27 et438b-1 27 V1V1 +V cc V2V2 -V cc VoVo Open loop OP AMP operation Ideal Voltage Comparator Operation Operation Logic When V 1 ≥ V 2, V o = -V sat When V 2 ≥ V 1, V o = + V sat Transition take place exactly when voltages are equal

28 et438b-1 28 OP AMP outputs typically saturate at 80% of supply voltages ±V cc Output Voltage V o =A v (V 2 -V 1 ) Output Range For a practical OP AMP with A v = 100,000 find the difference voltage that will cause output saturation. (±V cc = 15 Vdc) V d = (V 2 -V 1 ) so V o /V d = A v

29 et438b-1 29 Assume ±15 Vdc = ±V cc A v = 100,000. so V sat = 0.8(± V cc ) = 0.8(±15) = ± 12 Vdc From previous calculation V d = 0.12 mV so V d = V 2 - V 1 which gives 0.12 mV = V 2 - V 1 Take V 1 as the input voltage Take V 2 as the input voltage

30 et438b-1 30 Circuit realization with OP AMPs Logic: When V in > V ref V 0 = +V sat If V in > 5 then V 0 = +12 Vdc Find V ref using voltage divider Input/output plot V in V0V0 -V sat +V sat -12 Vdc +12 Vdc V ref = +5 Vdc Input to +

31 et438b-1 31 Determine the voltage where output transition takes place with V 2 as input V1V1 +V cc V in -V cc VoVo Input/Output Diagram -V sat +V sat V 2 =V in V0V0 0.12 mV V 2 =V 1 A v < infinity produces small voltage error in comparator circuits

32 et438b-1 32 Use standard OP AMPs when slow transitions are expected in the input signal. (e.g. thermostat application). When higher speeds are needed use dedicated comparator IC. (LM311) If V in > 8 then V 0 = -12 Vdc Logic: When V in > V ref V 0 = -V sat Input to - V0V0 Find V ref using voltage divider Input/output plot V in V0V0 -V sat +V sat -12 Vdc +12 Vdc V ref = +8 Vdc

33 Controller et438b-1 33 In on/off control error signal is binary in nature. Process Disturbances Sensor Final Control Element Controlled variable Comparator Signal Conditioning Controller Logic Setpoint Error signal Final control element is run at either 100% or 0% Comparator is hardware or software that compares the sensor value to the desired value (setpoint) and then outputs a binary value Manipulated variable

34 et438b-1 34 Home heating Controller Room Heat Loss Bimetallic Strip Furnace Thermostat Mechanical Scale Setting Fuel/Fan Electric Control Desired Temperature Error signal Furnace run time Room Temperature When room temperature falls below a preset temperature, the thermostat contacts activate the furnace fan and fuel supply.

35 et438b-1 35 1 Precise control must not be required 2 Process must have sufficient internal storage capacity to allow final control element to supply the load while measurement is taken. 3 Energy entering the load must be small compared to the stored energy in the process

36 et438b-1 36 Controller output goes to 100% when the temperature falls below set point value. Example for furnace shows furnace on when temperature falls below set point of 72 degrees

37 et438b-1 37 To improve the stability of an on/off controller a hysteresis is added to the comparator element This is called differential gap control Logic - when measured variable goes above upper boundary final control element turns on. Remains on until variable falls below lower level Gap also known as dead zone. Typically 0.5- 2.0% of full range. Gap introduces a known control error but reduces cycling

38 et438b-1 38 Furnace controller with 3 degree differential gap Temperature below Set=72 degrees furnace on. Shut off temperature is Set 1 =75 degrees. Controller Logic: IF Room Temp ≤ Set AND Furnace Output= 0 THEN Furnace Output =1 (T ↑) IF Room Temp ≤ Set 1 AND Furnace Output= 1 THEN Furnace Output =0 (T↓) Output depends on temperature and previous output state

39 et438b-1 39 Implementing Differential Gap Control with Comparators requires hysteresis Hysteresis - the output depends on the input and the previous state of the output. Vo Vin + R1=5k R2= 5k +10V Inverting Comparator with Hysteresis V ref Analysis: assume that V in < V ref V 0 = 0.8V cc V o =+ V sat = 8 Vdc Determine V ref from voltage divider formula Define this as the upper trip point (UTP)

40 et438b-1 40 Analysis continued Now assume that V in > V ref If V in > V ref, then V 0 = -V sat = 0 Vdc When V in > 0, V o = 0 Vdc and V ref = 0 Vdc Define as lower trip point (LTP) Vo Vin + R1=5k R2= 5k +10V V ref V o = 0 V V ref = 0 V Input/output Plot Comparator with Hysteresis -V sat V in V0V0 +10 Vdc V UTP = +4 Vdc V LTP = 0 Vdc +V sa t Increasing V in Decreasing V in

41 et438b-1 41 Non-zero voltage reference Use superposition to find the contributions to V 1 from output V o and V ref. Circuit Analysis Assume V in < V 1 V 0 = +V sat = 8 Vdc Ground V ref and find contribution to V 1 due to V o V1V1 V o = 8 V Ground V 0 and find contribution due to V ref Final value when V in > V 1 Upper trip point value (UTP) V UTP = 5.3 V

42 et438b-1 42 Non-zero voltage reference V1V1 V o = 0 V Assume that V in > V 1 so V 0 = -V sat = 0 V Since V o = 0 and V ref is grounded Now find contribution due to V ref Lower trip point value (LTP) By Superposition V LTP = 4.5 V Hysteresis voltage is the difference between the V UTP and V LTP. In this case: 5.3 - 4.5 = 0.8 Vdc (hysteresis)

43 et438b-1 43 Input/output Plot -V sat =0 +V sat =+8 Vdc V in V UTP = 5.3 Vdc V LTP = 4.5 Vdc V0V0 Increasing V in Decreasing V in Hysteresis voltage is the difference between the V utp and V ltp. In this case: 5.3 - 4.5 = 0.8 Vdc (hysteresis) VhVh

44 et438b-1 44 V UTP V LTP V in V out VhVh

45 et438b-1 45 Design Equations and Procedure Design Procedure Given: V cc, V h, V UTP, and R1, 1.) Find V sat 2.) Use Equation 3 to find R2 3.) Use Equation 1 to find V ref 1 2 3 Assumes bipolar output voltage

46 et438b-1 46 A temperature sensor has a gain of 20 mV/F. It will be used in an electronic thermostat system. Design a comparator with hysteresis circuit that will give a 4 degree F deadband for the thermostat control around a setpoint temperature of 72 degrees F. The comparator will use bipolar power supplies at +- 5Vdc. Interface the thermostat logic to a transistor driver (2N3904 h fe = 300) that will actuate a furnace control relay. The relay has a dc resistance of 250 ohms.

47 et438b-1 47 Vref Vo Vin + + 5 V R1 R2 -5 V

48 et438b-1 48 Continued -1-

49 et438b-1 49 Continued -2- Check Centering

50 et438b-1 50 Continued -3- Vref=1.44 V Vo Vin + + 5 V R1=4.7k R2=582.8k -5 V Now include the transistor output stage

51 et438b-1 51 Find value of R b to activate relay V ce(SAT) + - V be(SAT) + Find I c assuming saturation IcIc

52 et438b-1 52 V ce(SAT) + - V be(SAT) + IcIc Relate I c to I b through h FE (also known as , dc current gain) Reduce h FE by a factor of 10 due to effects of saturation on dc gain Apply KVL around the base-to-emitter circuit IbIb D1 Suppresses voltage spikes


Download ppt "ET 438b Department of Technology Southern Illinois University Carbondale et438b-1 1."

Similar presentations


Ads by Google