Computer Applications in Control
ACRRL
Applied Control & Robotics Research Laboratory of Shiraz University
Department of Power and Control Engineering, Shiraz University, Fars, Iran.
Instructor: Dr. Asemani
TA: Mohammad Sabouri
https://sites.google.com/view/acrrl/
1. ACRRL
Applied Control & Robotics
Research Laboratory
of Shiraz University
Computer
Applications in
Control
Lecture 1
2. ACRRL
Applied Control & Robotics Research Laboratory
of Shiraz University
Department of Power and Control Engineering, Shiraz University, Fars, Iran.
Instructor: Dr. Asemani
TA: Mohammad Sabouri
3. Course Overview
LabVIEW:
• Introduction to LabVIEW
• Programming with LabVIEW
• VISA Toolkit: Arduino
• Introduction to Raspberry Pi
• Connection to LabVIEW with Internet, LAN, WLAN
• Vision Development Module
• Control design toolkit, PID & Fuzzy control toolkit
• MathScript RT Module
5. Course Overview
In class Homework:
• 2 Score
Final Exam
• 7 Score
Project1:
• 1 Score
• Deadline: 6th March 2018 (15th Esfand 1396)
Project2:
• 1.5 Score
• Deadline: 14th April 2018 (25th Farvardin 1397)
Project3:
• 1.5 Score
• Deadline: 1st June 2018 (11st Khordad 1397)
Final Project:
• 7 Score
• Deadline: 11th July 2018 (20th Tir 1397)
6. Different software for Control design
• NI LabVIEW
• Matlab, Simulink® Software
• MapleSoft (MapleSim)
• ANSI C
• Esterel SCADE
• NI MATRIXx SystemBuild
7. Different software for Control design
The MathWorks, Inc. Simulink® Software
NI LabVIEW MapleSoft MapleSim
Esterel SCADE
ANSI C
NI MATRIXx SystemBuild
8. Overview of LabVIEW
• LabVIEW – Laboratory Virtual Instrument Engineering Workbench
• Graphical programming language that allows for instrument control,
data acquisition, and pre/post processing of acquired data.
9. Graphical programming language & Data flow
• LabVIEW relies on graphical symbols rather than textual language to
describe programming actions.
• The principle of dataflow, in which functions execute only after receivi
ng the necessary data, governs execution in a straightforward manner.
11. How does LabVIEW work?
• LabVIEW programs are called:
Virtual Instruments (VIs)
because their appearance and operation imitate actual instruments.
• However, they are analogous to main programs, functions and subroutines
from popular language like C, Fortran, Pascal, …
12. LabVIEW Power
Windows | Mac | Linux® | RTOS
English | French | German | Japanese | Korean | Chinese
13. LabVIEW 2017 system requirements
Windows Run-Time Engine Development Environment
Processor
1
Pentium 4M/Celeron 866 MHz (or equivalent) or later (32-bit)
Pentium 4 G1 (or equivalent) or later (64-bit)
Pentium 4M (or equivalent) or later (32-bit)
Pentium 4 G1 (or equivalent) or later (64-bit)
RAM 256 MB 1 GB
Screen Resolution 1024 x 768 pixels 1024 x 768 pixels
Operating System Windows 10/8.1
2
/7 SP1
3
Windows Server 2012 R2
2
Windows Server 2008 R2 SP1
3
Windows 10/8.1
2
/7 SP1
3
Windows Server 2012 R2
2
Windows Server 2008 R2 SP1
3
Disk Space 620 MB 5 GB (includes default drivers)
Windows
14. Matlab 2017 system requirements
Operating Systems Processors Disk Space RAM Graphics
Windows 10
Windows 8.1
Windows 7 Service
Pack 1
Windows Server 2016
Windows Server 2012
R2
Windows Server 2012
Windows Server 2008
R2 Service Pack 1
Any Intel or AMD x86-
64 processor AVX2
instruction set support
is recommended
With Polyspace, 4 core
s is recommended
2 GB for MATLAB
only,
4–6 GB for a
typical installation
2 GB
With Simulink, 4
GB is required
With Polyspace, 4 G
B per core is recom
mended
No specific graphics
card is required.
Hardware accelerate
d graphics card supp
orting OpenGL 3.3 w
ith 1GB GPU memor
y is recommended.
15. LabVIEW Vs Matlab
• MATLAB is much better for computation than LabVIEW, mostly because classical program
code is much more appropriate for calculations than block diagrams.
• Chart shows that the functions for classical engineering calculations (Bode, FFT) are very well
optimized in LabVIEW and faster than in MATLAB.
• The biggest advantage of LabVIEW is fast and simple construction of the graphical user
interface that facilitates the updating of parameters (no need to interfere with the code) and e
legant presentation of the results.
• Another advantage of LabVIEW is that most MATLAB functions are accessible from LabVIEW
via the MathScript Node, which can actually pass data to m code, execute it and get results
back.
18. Product LabVIEW 2017 (32-bit) LabVIEW 2017 (64-bit)
Advanced Signal Processing Toolkit ✓ —
Control Design and Simulation Module ✓ ✓
1
Database Connectivity Toolkit ✓ —
DataFinder Toolkit ✓ —
Datalogging and Supervisory Control Module ✓ —
Desktop Execution Trace Toolkit for Windows ✓ ✓
Digital Filter Design Toolkit ✓ —
FPGA Module ✓ —
MathScript RT Module ✓ ✓
2
Report Generation Toolkit for Microsoft Office ✓ ✓
Real-Time Module ✓ —
Robotics Module ✓ —
SoftMotion Module ✓ —
Statechart Module ✓ —
Sound and Vibration Measurement Suite ✓ ✓
Unit Test Framework Toolkit ✓ ✓
VI Analyzer Toolkit ✓ ✓
Vision Development Module ✓ ✓
LabVIEW 2017 Supported Modules and Toolkits
19. Design
– Signal and Image Processing
– Embedded System Programming
– (PC, DSP, FPGA, Microcontroller)
– Simulation and Prototyping
– Power Station
– DCS, SCADA
– And More…
Features of LabVIEW
20. Control
– Automatic Controls and Dynamic Systems
– Mechatronics and Robotics
– Power Station
– Manufacture Process
– Monitoring
– Ground control station
– Production Line
– And More…
Features of LabVIEW
21. Measurements
– Circuits and Electronics
– Measurements and Instrumentation
– Factory
– Laboratory
– Education
– And More…
Features of LabVIEW
22. Hardware in LabVIEW
Data Acquisition Device (DAQ)
Actual USB, PCI, or PXI Device
Configured in MAX
Simulated Data Acquisition Device (DAQ)
Software simulated at the driver level
Configured in MAX
Sound Card
Built into most computers
Arduino
USB
23. Sound Card* NI USB DAQ NI PCI DAQ Arduino Instruments*
AI Bandwidth 8–44 KS/s 10–200 KS/s 250 K–1.2 Ms/s — 20kS/s–2 GS/s
Accuracy 12–16 bit 12–16 bit 14–18 bit 8-10 bit 12–24 bit
Portable x x — Yes some
AI Channels 2 8–16 16–80 6-12 2
AO Channels 2 1–2 2–4 0-2 0
AC or DC AC AC/DC AC/DC AC/DC AC/DC
Triggering — x x x x
Calibrated — x x x x
What type of device should I use?