Académique Documents
Professionnel Documents
Culture Documents
Analyze Output
Determine needs Data to process
Open-Loop Control
System determines output needs
No Feeback
Control Overview
Closed-Loop Control
Data acquired to determine current state
Control system determines output needs
Feedback provided
Control Overview
Temperature Example
Data acquired from thermometer
Controller determines temperature status (too high? Low?)
Heater or AC turned on / off
Control Terminology
Terms: Examples:
Process variable Temperature
Setpoint Desired temperature
Controller output Heater voltage
Plant Furnace
Acquire
Acquire
Data from process
Single-point acquisition
Allows fast control loops
Analysis
Analyze
Determine needs
Analyze acquired points
Use full range of LabVIEW functions
Mean, RMS, FFT,
Single-point versions of multiple-point functions
Analysis Functionality
Array-Based Analysis Point-by-Point Analysis
1. Acquire all points 1. Acquire one point
of data stream of data stream
2. Filter and analyze 2. Filter and analyze
3. Make decision 3. Make decision
4. Generate report 4. Generate report
Demo: Single-point analysis
1- PointByPoint.vi
Software only
Analysis
Analyze
Determine needs
Analyze acquired points
Determine proper output signal
Simple Control
PID
Fuzzy Logic
How do you implement Control?
Analyze
Determine needs
Evaluate Error
Proportionally
Evaluate History
Integrate error over time
Evaluate dynamics
Rate of change of error- derivative
PID Control Analyze
Determine needs
PID Parameters Analyze
Determine needs
Proportional gain Kc
Excitation 1 MOhm
Analog In
.153uF .153uF
- -
Demo: P only
2- Simple PID.vi
DAQ, Simple Circuit
PID Gains PI
Integral gain Kc / Ti
Fine tuning
Integrates error over time
Overcomes offset from
Proportional
May cause overshoot,
oscillation, and instability
problems
+ +
Excitation Analog In
- -
Demo: PI
2- Simple PID.vi
DAQ, Simple Circuit
PID Gains PID
Derivative gain Kc* Td
Whoa
Puts the reigns on PI control
Prevents overshoot and
oscillation
Adds stability
+ +
Excitation Analog In
- -
Demo: PID
2- Simple PID.vi
DAQ, Simple Circuit
PID Considerations Analyze
Determine needs
Tuning
Integrator Windup
Varying Behaviors
Manual / Auto switch
Hold Value
Loop Speed
PID Toolkit
Analyze
Determine needs
Tuning Autotuning
Integrator Windup Integrator Anti-windup
Varying Behaviors Gain scheduling
Manual / Auto switch Switch
Hold Value Hold mode
Loop Speed
+ +
Excitation Analog In
- -
3- Toolkit PID
DAQ, Simple Circuit
Fuzzy Logic Dataflow
Fuzzy Logic Control for LabVIEW Analyze
Determine needs
Why is fuzzy logic important?
Easy to implement an intuitive control strategy
Better control of non-linear systems
PID control is linear
Fuzzy control is non-linear
Fuzzy Logic: Rule-Based Control Analyze
Determine needs
Example
If temperature is high, then heater voltage output should be
low.
Membership sets
What is meant by high?
Fuzzy Sets Analyze
Determine needs
Boolean (or two-valued) sets:
Members belong to a set non-members do not
Traditional Boolean values (on/off, 1/0)
Fuzzy Sets:
Partial membership to set allowed
Values along continuum of 0 to 1
Boolean Set Analyze
High Body Temperature Determine needs
Membership
Temperature
Fuzzy Set Analyze
High Body Temperature Determine needs
Membership
Temperature
Fuzzy Logic Control
+ +
Excitation Analog In
- -
4- Fuzzy.vi
Simple Circuit
Fuzzy Logic and PID Combined
Set Point Values Fuzzy Controller Process
Command Variable
Rule base
IF AND THEN
IF AND THEN
P
I
IF AND THEN
D PID
Measured Values
Fuzzy Logic Design Software Analyze
Determine needs
+ +
Excitation Analog In
- -
5- Fuzzy.vi
Simple Circuit
Control Concerns
Tuning Autotuning
Integrator Windup Integrator Anti-windup
Varying Behaviors Gain scheduling
Manual / Auto switch Switch
Hold Value Hold mode
Loop Speed Real-Time
Real-Time Definitions Output
Real-time means same time Data to process
Target
Develop on Execute on
Host Computer RT Target
Download
PXI - Compact PCI for Control
Compact and modular form
Ethernet connectivity
Excellent networking protocols
DataSocket
VI Server
TCP/IP
RT Series PXI Embedded Controllers
PXI Backplane
Processor
Up to 40 kHz PID loop rate
I/O integration
Headless operation
Hard drive or CompactFlash
Watchdog timer
Memory
DAQ Boards
SCXI Modules
Demo: PXI-RT
6- Audio.vi
PXI Sound Demo
LabVIEW RT
Low cost RT controller
Easy to configure
Easy to program
Reliable
Full access to hard drive, cards, and some peripherals
High loop speeds
~50 microseconds
PXI Timing and Triggering
Star Trigger
10 MHz
CLK
Real-Time OS
Star Trigger
Peripheral
Peripheral
Peripheral
Controller
Controller
System
Local Bus
Processor
Processor Board
RT Series
E Series
Board
DAQ
DAQ
DSA
Signal Conditioning
Signal Monitor
Oil Pressure
Oil Temperature
Safety
Air Pressure Shutdown
Turbo Speed
Vibration
Turbo Charger Unit Under Test
LV-FPGA
Watchdog timers
Embedded processor
Isolation
Host Computer
RT Target
Execute
Front Panel
displays on Host
Host Computer
Default
Communication
Code executes
on RT Engine
RT Target
Demo: Default Communication
7- PID-Cycle Time.vi
FP - Temperature
Default Communication
No additional programming
Quick for debugging
Insufficient for some cases
Uses more network bandwidth than necessary
Unable to save data for further analysis
Need LabVIEW Real-Time development system on host
LabVIEW Web Server
FP-2000 Runs Web Server
Clients view VI Front Panel in Internet Explorer
Clients need run-time installed (free)
Clients can request control of VI
Deploy
Host Computer
Custom
Communication
RT Target
Demo: DataSocket Communication
8-
FP - Temperature
Round Robin Scheduling
Shop Manager
(Scheduler)
Normal
Normal Mechanic
(CPU)
Normal
Preemptive Scheduling
Time Shop Manager
Critical (Scheduler)
Normal
Normal Mechanic
(CPU)
Normal
LabVIEW Real-Time Scheduler
Combination of Round Robin and Preemptive
Normal priority shares the CPU
Time-critical priority releases CPU when finished or sleeping
Assign priority to each VI
Timing for Real-Time Applications
Real-Time Terminology
Determinismhow consistently a system is able to perform
operations within a fixed time
Jitteramount of time the actual loop cycle time varies from the
desired cycle time
Sleepperiod of time when the thread programmatically relinquishes
control of the processor
Objectives
Maximize performance
Maximize determinism
Minimize jitter
Jitter Diagram
Jitter
1
Loop Iteration
2
3
4
5
Loop Time
Timing Strategies
Software
Wait until next millisecond multiple VI
Millisecond loop rates (microsecond jitter)
Hardware
Sample or update clock of I/O board
Microsecond loop rates (nanosecond jitter)
HW Clock
AI Scan
Software Timing Diagram s AI sampled
jitter AO written
AI PID AO SW Sleep
1
2
Loop Iteration
3
4
AI PID AO HW Sleep
1
2
Loop Iteration
3
4
AI PID AO HW Sleep
1
2
Loop Iteration
3
4
9- Jitter Test.vi
NI-Scope
PXI - Scope
Networked Real-Time Application
Development PC-Based Web Viewers
Machine Instrument
Internet
GPIB Serial
Conclusion
More Information:
2002 National Instruments Catalog
www.ni.com
zone.ni.com
www.daqman.com
Steve.summers@ni.com
Steve.aposhian@ni.com