Title: EML 4314C
1EML 4314C
2Topics
- Digital Data Acquisition
- Lab 1 characteristics of A/D and D/A
converters, aliasing - AC Circuits and Filtering
- Lab 2 filter response amplitude and phase
shift of output signal compared to that of input
signal - Microcontrollers
- Lab 3 microprocessors
- Modeling of 2nd Order Systems
- Lab 4 modeling and solving equations of motion
- Parameter Identification
- Lab 5 From set of system responses determined m,
k, c, and Lo
3Data Acquisition
- description of A/D converter
- number of bits
- range, resolution, quantization error
- how digital value is calculated based on bins
4Data Acquisition
5Data Acquisition
- incorrect conclusions
- clipping
- aliasing
6Data Acquisition
7Data Acquisition
8Topics
- Digital Data Acquisition
- Lab 1 characteristics of A/D and D/A
converters, aliasing - AC Circuits and Filtering
- Lab 2 filter response amplitude and phase
shift of output signal compared to that of input
signal - Microcontrollers
- Lab 3 microprocessors
- Modeling of 2nd Order Systems
- Lab 4 modeling and solving equations of motion
- Parameter Identification
- Lab 5 From set of system responses determined m,
k, c, and Lo
9Filtering
- sinusoidal signals v(t) Vm sin(?tf)
- frequency and phase angle
- period (time to complete one cycle)
10Filtering
- Eulers formula for representing sinusoidal
signals ej?t cos (?t) j sin (?t) - imaginary part represents sine wave (projection
of rotating vector on imaginary axis) - often written as v(t) Vm ej?t
11- circuit analysis
- resistor
- v(t) Vm sin(?t)
- i(t) Vm/R sin(?t)
- inductor
- v(t) Vm sin(?t)
-
- capacitor
- v(t) Vm sin(?t)
- i(t) ?C Vm sin(?t 90º)
current in phase
current lags
current leads
12- now lets use the complex notation to describe
the relationship between current and voltage - resistor VR R IR
- inductor VL j ? L IL (current
lags voltage by 90º) - capacitor VC 1/(j?C) IC (current leads
voltage by 90º)
13Filtering
- low-pass
- high-pass
- band-pass
- band-stop
14Filtering
- design of 1st order low-pass filter using
capacitor and resistor
f arctan(-?RC)
15Filtering
- design of 1st order high pass filter
16Filtering
- first order band-pass filter
17Filtering
- 2nd order low-pass filter
18Topics
- Digital Data Acquisition
- Lab 1 characteristics of A/D and D/A
converters, aliasing - AC Circuits and Filtering
- Lab 2 filter response amplitude and phase
shift of output signal compared to that of input
signal - Microcontrollers
- Lab 3 microprocessors
- Modeling of 2nd Order Systems
- Lab 4 modeling and solving equations of motion
- Parameter Identification
- Lab 5 From set of system responses determined m,
k, c, and Lo
19Microprocessors
20our chip
16F627
This powerful (200 nanosecond instruction
execution) yet easy-to-program (only 35 single
word instructions) CMOS Flash-based 8-bit
microcontroller packs Microchip's powerful PIC
architecture into an 18-pin package and is
upwards compatible with the PIC16C62XA, PIC16C5X
and PIC12CXXX devices. The PIC16F627 features
4MHz internal oscillator, 128 bytes of EEPROM
data memory, a capture/compare/PWM, a USART, 2
Comparators and a programmable voltage reference
that make it ideal for advantage analog /
integrated level applications in automotive,
industrial, appliances and consumer applications.
21power circuitry
22our application
23reading and writing to pins
- by default, TRISA and TRISB are set to 1111 1111
which means that all the pins RA0?RA7 and RB0?RB7
are set as input pins - clearing bit n in TRISB will set pint RBn as an
output pin - the 8 bits of PORTA correspond to the pins
RA0?RA7 - the 8 bits of PORTB correspond to the pins
RB0?RB7 - output pin example
- if bit 3 in TRISA has been cleared (set to 0),
i.e. 1101 1111, then pin RA3, is set as an output
pin - setting bit 3 in PORTA to 1 will cause pin RA3 to
have a potential of 5V - clearing bit 3 in PORTA will cause pin RA3 to
have a potential of 0V - input pin example
- if bit 2 in TRISA has been set, then pin RA2 is
set as an input pin - pin 2 of the register PORTA can be checked at any
time to determine whether pin RA2 is at 5V or 0V
24our program
- set pin 17 as an input pin
- set pin 6 as an output pin
- loop_label
- read state of pin 17
- set state of pin 6 to state of pin 17
- goto loop_label
25Topics
- Digital Data Acquisition
- Lab 1 characteristics of A/D and D/A
converters, aliasing - AC Circuits and Filtering
- Lab 2 filter response amplitude and phase
shift of output signal compared to that of input
signal - Microcontrollers
- Lab 3 microprocessors
- Modeling of 2nd Order Systems
- Lab 4 modeling and solving equations of motion
- Parameter Identification
- Lab 5 From set of system responses determined m,
k, c, and Lo
26Spring-Mass-Damper System
27Solution of Diff E Using Laplace Transform
- L(f '(t)) sL (f) - f(0)
- L (f "(t)) s2L (f) - sf(0) - f'(0)
28Analysis of system with no damping
- no driving force no initial velocity
29Analysis of system with no damping
30Analysis of system with damping
31Analysis of system with damping
32Analysis of system with damping
c25
c250
c2.5
33Analysis of system with damping
- solved for time response when there is small
damping, i.e. c2 lt 4 m1 k1
34Topics
- Digital Data Acquisition
- Lab 1 characteristics of A/D and D/A
converters, aliasing - AC Circuits and Filtering
- Lab 2 filter response amplitude and phase
shift of output signal compared to that of input
signal - Microcontrollers
- Lab 3 microprocessors
- Modeling of 2nd Order Systems
- Lab 4 modeling and solving equations of motion
- Parameter Identification
- Lab 5 From set of system responses determined m,
k, c, and Lo
35Parameter Identification
36Parameter Identification
37Parameter Identification
- we can measure the frequency that will give us
38Parameter Identification
Use the logarithmic decrement, d, to find ?
- L01 can be obtained from the data as the steady
state position - (x1(t1)-L01) and (x1(tn)-L01) can be measured
- solve for ?
39Parameter Identification
- add a known mass ?m to the car and obtain ?2 and
then ?n2
- use a large ?m so ?n and ?n2 will differ enough
so that any error in measuring the frequencies
will not significantly impact the calculations - Lastly, determine c for
- the two cases from ?
40Topics
- Digital Data Acquisition
- Lab 1 characteristics of A/D and D/A
converters, aliasing - AC Circuits and Filtering
- Lab 2 filter response amplitude and phase
shift of output signal compared to that of input
signal - Microcontrollers
- Lab 3 microprocessors
- Modeling of 2nd Order Systems
- Lab 4 modeling and solving equations of motion
- Parameter Identification
- Lab 5 From set of system responses determined m,
k, c, and Lo