Upload
angel-tolman
View
220
Download
0
Tags:
Embed Size (px)
Citation preview
Microcontroller-based Data Acquisition/Control Applications and
Synchronization of Sampled-data Chaotic Systems
Sang-Hoon LeeDepartment of Mechanical and Aerospace Engineering
Polytechnic University, Brooklyn, NY 11201
Lee 2
• Motivation
• Goals
• Prior research
• Hardware components
• Software components
• Coupled two-tank system
• System model & ID
• Proposed research—I
Outline
• Chaos and Synchronization
• Motivation and goals
• Master-slave synchronization
• Problem formulation
• Control design objective
• Chua’s system
• Experimental setup
• Proposed research—II
Lee 3
PC-based data acquisition and control (DAC) boards
• High-end DAC boards (e.g., Quanser and National Instruments)
– Advanced hardware capabilities and sophisticated software environment
– Drawback: cost! (hundreds to few thousand dollars)
• DAC boards supported by MATLAB
– Costly and usually include additional hardware features that may not be fully used (e.g., high sampli
ng rates and high resolution analog to digital converter)
• Low-end DAC boards
– Relatively low cost
– Drawback: use proprietary software
• Graphical User Interface (GUI) capabilities are nonexistent for microcontrollers
– Microcontrollers are not designed to directly interact with human beings
– Microcontrollers are directly embedded into automated products/processes
Motivation
Lee 4
• Develop a low-cost MATLAB-based DAC systems by exploiting
– Microcontrollers
– MATLAB
– Simulink (Dials and Gauges Blockset)
– Serial communication capabilities of MATLAB and microcontrollers
• The GUIs which will be designed using our framework allow the user to
– Vary control commands
– Acquire sensory data
– Perform data processing
– Visualize and control data using realistic looking virtual instruments
• Use the MATLAB DAC toolbox to facilitate
– Automatic generation of proper program codes for a variety of sensors and actuators
– Automatic programming of the microcontrollers
– Data communication between the microcontrollers and MATLAB
Goals
Lee 5
• BASIC Stamp 2 (BS2) microcontroller to LabVIEW interface by Radcliffe, 2001
• An approach to endow BS2 microcontroller with GUI capabilities by interfacing it
with MATLAB by Li, Harari, Wong, and Kapila, 2004
Prior Research
Lee 6
• Microcontrollers are designed to interface to and interact with electrical/electronic
devices, sensors and actuators, and high-tech gadgets to automate systems
– Directly embedded into the product or process for automated decision making
– Do not have GUI capabilities that are common in many PC applications
Peripheral Interface Controllers (PICs)
• Inexpensive microcontroller units (few dollars) that include
– Central processing unit
– Peripherals: memory, timers, and I/O functions
• PIC Assembly language
• 35 single-word instruction set
• Various selection
Hardware Components–PIC
Lee 7
• BS2 Microcontroller is a 24-pin DIP IC based on Microchip Inc.’s PIC 16C57 microcontroller
– 32 bytes of RAM and 2 kilobytes of EEPROM of memory
– 16 general-purpose digital input/output (I/O) pins that are user defined
– BS2 processing speed is approximately 4000 instructions/sec
• Board of Education (BOE) is a carrier board interfacing BS2 to additional hardware
– Provides DB9 connector for BS2
– Provides connectivity to BS2’s general purpose I/O pins
• BS2 installed on BOE transmits/receives data to/from the PC via serial communication
Board of Education
Hardware Components–BS2
BS2
Lee 8
• BS2 and PC communicate through a RS-232 serial communication link
– Allows user program to be sent to the BS2
– Allows data exchange between BS2 and PC
– BS2 maximum data exchange rate (Baud rate): 9600 kilobytes per second
– PC identifies serial ports as COM ports
Pin assignments for a DB-9 serial cable
Pin # Label Signal Name Signal Type
1 CD Carrier detect Control
2 RD Received data Data
3 TD Transmitted data Data
4 DTR Data terminal ready Control
5 GND Signal ground Ground
6 DSR Data set ready Control
7 RTS Request to send Control
8 CTS Clear to send Control
9 RI Ring indicator Control
1
9876
5432
Male DB-9 Connector
• A DB-9 serial cable facilitates data
communication between BS2 and PC
Hardware Components–Serial Communication
Lee 9
• PIC assembly language is a primitive programming language consisting of a 35 single-
word instruction set
• Parallax Beginner's all-purpose symbolic instruction code (PBASIC) is a high level
programming language similar to BASIC
• PBasic includes many of the same functions found in BASIC, plus microcontroller
specific functions (e.g., serial communication, PWM, I/O pin monitoring/ control, etc.)
• Key benefits of utilizing PBASIC as a microcontroller programming language:
– Simple, high-level programming language to implement and debug microcontroller programs
– Intuitive commands used for interacting with BS2 hardware
Software Components–PIC Assembly and PBASIC
Lee 10
• MATLAB is an interactive technical computing software
– MATLAB versions 6.1 and higher support serial communication
– Custom designed m-file functions provide serial communication functionality
Software Components–MATLAB
Lee 11
• Simulink is a model-based, system-level, visual programming environment
– Used to simulate and analyze dynamic systems using icon-based tools
– User can design Simulink diagrams by:
• Dragging and dropping Simulink blocks into a Simulink diagram
• Connecting I/O ports of Simulink blocks
• Changing Simulink block parameters
Software Components–Simulink
Lee 12
• Dials and Gauges Blockset provides a library of Simulink blocks that are in the form
of visual, realistic-looking, virtual instruments
– Transforms Simulink block diagrams into virtual control panels
Small subset of Dials and Gauges blocks
Software Components–Dials and Gauges Blockset
Lee 13
• Two-tank system consists of:
– Two liquid level tanks with orifices
– Liquid level sensors at the bottom of each tank
– Voltage controlled pump
– Liquid basin
• Pump provides the liquid infeed into Tank 1
• Outflow of Tank 1 becomes the liquid infeed to Tank 2
• Outflow of Tank 2 is emptied into the liquid basin
• Two tanks have the same diameters and can be fitted
with differing diameter outflow orifices
Coupled Two-Tank System
Lee 14
Coupled Two-Tank System Model
)()()( 11 tBVtLAtL p
)()()( 212 tLDtLCtL
parameters system - ,,, DCBA
2 and 1 tank of levels liquid - , 21 LL
voltagepump - pV
Lee 15
System Identification
• Provide a fixed pump voltage to allow for steady state conditions to occur
– Obtain system parameter ratios A/B and C/D
• Fill Tank 1 with a fixed amount of water and let it drain out to Tank 2
– Compute the system parameters A and B using the transient response data
• Fill Tank 2 with a fixed amount of water and let it drain out to the basin
– Compute the system parameters C and D using the transient response data
Lee 16
• Develop MATLAB and Simulink-based DAC toolbox by
– Using BS2 and PIC microcontrollers
– Utilizing MATLAB, Simulink, and Dials/Gauges Blockset
– Exploiting the serial communication functionality of MATLAB and the microcontrollers
• Develop user-defined microcontroller libraries that allow
– The generation of proper microcontroller codes for a variety of sensors and actuators
– Programming of the microcontroller
– Data communication between the microcontroller and MATLAB
• Develop an experimental setup to show the effectiveness of our MATLAB-based GU
I environment by performing liquid-level control of a coupled, two-tank system and
– Design a classical PI controller for the system
– Determine the system parameters by an experimental system identification study
Proposed Research—I
Lee 17
• Mostly described as a deterministic system that exhibits aperiodic behavior depe
nding on the initial conditions
Chaos
Lee 18
“Two oscillators”
with a coupling
may give rise to chaos
but for a proper parameter choice
they may synchronize
School of fish Flock of birds Team of robots
Synchronization
Lee 19
• Synchronization of chaotic oscillators: Secure communication systems
– Use chaos to mask a transmitted signal
– Recover the signal securely in reception using chaos synchronization
• Sampled-data: improve robustness of secure communication
– Noise corruption in analog signal transmission is a severe drawback
• Pulse synchronization: particularly more realistic for real communication systems
– Reduce power load
– Reduce time delay
• Sampled-data: design of robust and effective cooperative control algorithms for
spatially distributed robots
Motivation
Lee 20
• Design a periodic state feedback control law for global pulse synchronization
of sampled-data chaotic system
• Perform experimental validation of a sampled-data representation of Chua's
oscillators implemented using microcontrollers and RF communication
Goals
Lee 21
• Assumption: nonlinear vector function g(·) satisfies
where
Master
+-
Slave
( )x t
( )u t
( )x t( )Ke t
( )e t
KVast literature!
lim ( ) ( )tx t x t
Synchronization
Master-Slave Synchronization—C.T. Case
Lee 22
• Euler approximation of continuous-time master and slave systems
– Let u(t)=0, no loss of generality, and let h be the step-size for Euler approximation
– Master system
– Slave system using unidirectional coupling
where ,
• Pulse synchronization
– Pulse control: K(k) is a periodic gain matrix
0
…1 2 p-1 p p+1
Master-Slave Synchronization—Sampled-data Case
Lee 23
• Design control gains so that
• Error system for pulse synchronization
• Error system formulation
where we have used
,
Problem Formulation
Lee 24
• Sampled-data master-slave system need to be asymptotically synchronized
for arbitrary initial conditions
• Error system dynamics need to asymptotically converge to zero for
arbitrary initial conditions
Control Design Objective
Lee 25
1 1 2 1
2 1 2 3
3 2
( ( ))x x x f x
x x x x
x x
State-space model:
22 2
1
,C C R
C L
Illustrative Example: Chua’s Circuit
Lee 26
• Plots of double scroll attractors of the sample-data master Chua’s circuit
• Parameters of sample-data master Chua’s circuit and nonlinear function
Chua’s System—Sampled Data Representation
Lee 28
• Develop a state feedback controller for the pulse synchronization of a master-slave ch
aotic system in the sampled-data setting
– Use the Euler approximation technique to discretize the system
– Formulate the problem of global asymptotic synchronization of the system as equivalent to
the states of a corresponding error system asymptotically converging to zero for arbitrary in
itial conditions
– Use a discrete-time Lyapunov stability theory
– Use a linear matrix inequality
• Develop an experimental setup to validate our research by performing Synchronizatio
n of a sampled-data master-slave chaotic system based on Chua's circuit
– Using Propeller microcontroller
– RF wireless communication
Proposed Research—II