Documente Academic
Documente Profesional
Documente Cultură
in 3 Hours
for Control Design and Simulation
+_
1
s
Design
Prototype
Deploy
Embedded Control
Flight Control
Process Control
Motion Control
Engine Control
Topics Covered
A. Review: LabVIEW Environment
Modeling
Control Design
Simulation
Optimization
Deployment
Startup Screen:
Start from a Blank VI:
New Blank VI
or
Start from an Example:
Examples Find
Examples
Front Panel
Block Diagram
Front Panel
Indicator:
Gauge
Structure:
While Loop
Numeric
Controls
Numeric
Indicator
Additional Buttons on
the Diagram Toolbar
Execution Highlighting Button
Retain Wire Values Button
Step Function Buttons
MathSoft software
MATLAB software
Xmath software
(FunctionsProgramming
StructuresMathScript)
Variable
Workspace
View/Modify
Variable Contents
m-file Script
User Commands
(LabVIEWToolsMathScript Window)
5.
Step 1:
Modeling
Identify a mathematical representation of
the plant
Why Model?
A model represents a physical system
Inputs and outputs have real-world units
It is often a simplification of the systems behavior
Many types of systems can be modeled
Mechanical systems
Electronic circuits
Analog and digital filters
Thermal and fluid systems
Models can be represented in many ways
Transfer function
State space
Others
m ( s)
Km
2
Vm ( s) J eq Rm s K m
In this case, the model of the system is derived from the physical model
(using physics). An alternative would be to measure system response to
stimulus and derive a model with LabVIEW System Identification Toolkit.
Motor Diagram
2.
where : L R
3.
Mechanical
4.
5.
where : T 0
6.
(substitute in Electrical eqn)
7.
V
m
Fixed Magnets
Motor Coil
Brushes
Drive Shaft
Encoder
Inertial Mass
Km
2
J eq Rm s K m
Unit
3.30
0.0280
0.0280
9.64e-6
0.033
0.0242
ohms
N.m
V/(rad/s)
kg.m2
kg
m
24
5
2.3
V
A
V/V
Vm Input Voltage
Plant(Motor)
Vm
Value
m Angular Velocity
Exercise 1a:
Create and Display a Transfer Function
Plant(Motor)
Vm
Km
2
J eq Rm s K m
Vm Input Voltage
m Angular Velocity
Exercise 1b:
Create and Display a Transfer Function
Plant(Motor)
Vm
Km
2
J eq Rm s K m
Vm Input Voltage
m Angular Velocity
Step 2:
Control Design
Choose a control type and design a
controller
Control Systems
A control system consists of a Controller model
and a Plant model.
Control systems can be open or closed loop.
Controller Plant(Motor)
Setpoint
error
+_
PID
Vm
Km
2
J eq Rm s K m
1
s
Output
+_
PID
Output
PID
B
A
Parallel:
+
+
B
+
Feedback:
A
B
MathScript
Series
Parallel
Feedback
Append
Vm
Km
2
J eq Rm s K m
1
s
Output
Controller Plant(Motor)
Setpoint
+_
error
PID
Vm
Km
2
J eq Rm s K m
1
s
Output
Exercise 2:
Construct a PID Controller
Step 3: Simulation
Test the controller and incorporate realworld nonlinearities
Input Node
Main Loop
Output Node
Exercise 3:
Simulate the Motor Control System
+_
PID
Km
2
J eq Rm s K m
1
s
Introducing Nonlinearities
Sources of Nonlinearities
Saturation
Noise
Friction
Nonlinearity Example
Introducing a saturation nonlinearity with the Simulation
Module can change the behavior of a model dramatically.
Ideal response with linear
model in Control Design
Kc = 10
Ki = 0
Kd = 1
Controller Optimization
Control Design
Tune Controller Parameters
Estimate Performance
Simulation
Introduce Impairments and Nonlinearities
Verify Performance
Exercise 4:
Tune the Controller
+_
PID
Km
2
J eq Rm s K m
1
s
Step 5: Deployment
Implement the finalized control
system
5.
Deploy the control algorithm on real hardware to control the speed of the motor.
Deployment
Moving from a simulated model to a real life model
Replace Plant Model with Hardware I/O
Make sure Hardware I/O timing matches Simulation
Loop timing
Exercise 5: (Optional)
Use the Controller in a Real Life System
+_
PID
1
s
http://sine.ni.com/nips/cds/view/p/lang/en/nid/13853
http://sine.ni.com/nips/cds/view/p/lang/en/nid/13854
Simulation Module:
http://sine.ni.com/nips/cds/view/p/lang/en/nid/13852
Modular
Linear Pendulum
3 Degree of
Freedom
Helicopter
Additional Resources
NI Academic Controls Web
http://www.ni.com/academic/controls
LabVIEW Certification
LabVIEW Fundamentals Exam (free on www.ni.com/academic)
Certified LabVIEW Associate Developer Exam (industry recognized certification )