l1 - Introduction - v22

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 40

FYS3240- 4240

Data acquisition & control

Introduction
Spring 2022– Lecture #1

Jan Kenneth Bekkeng

Bekkeng 30.12.2021
Admin information
• The course was changed for 2021!

• Adapted to the present COVID-situation


– Lab exercises that do not require access to a lab.
– Required hardware can be borrowed (and is low cost).
– Required software (LabVIEW and Arduino IDE) can be installed
on your personal computer.
What is expected on the exam?

• Focus is on principles and fundamental understand (more


than remembering every detail).
• You will not be asked to do LabVIEW programing! However, it
is expected that you understand and can explain very basic
LabVIEW code.
• It is expected that you understand (and can write) basic code
for Arduino.
• Under the course page for previous years, you will find exam
questions and solutions. Note that the course was changed in
2021. Causing several questions not to be part of the new
curriculum and new topics (navigation, attitude, inertial
navigation, Arduino and satellite and missile control) not to be
part of previous exam questions. Exam in 2021 was oral
(Zoom) due to COVID-19.
Curriculum

• Lecture notes
• Laboratory exercises
• Chapter 2 and Chaper 4 in the book “Fundamentals
of Inertial Navigation, Satellite-based Positioning
and their Integration”
• Two technical reference papers:
– Stochastic models, estimation and control (by
Maybeck)
– An Introduction to the Kalman Filter (by Welch
and Bishop)
• Section 1 and 3

Book/papers are on Canvas - Pensum

A detailed reading list will be available later!


Book

• Fundamentals of Inertial Navigation, Satellite-


based Positioning and their Integration
– Chapter 2 and 4
– Chapter 1 is recommended as an introduction
– Chapter 7 is recommended support material for
Kalman filter.

• Free eBook
– On Canvas - Pensum
Recommended support material
• Arduino Cookbook, 3rd Edition, ISBN: 9781491903520
– chapter 1, 2, 3, 4 and 6.

• Free eBook
– On Canvas - Pensum
Exam

• Oral exam in 2020 and 2021 (due to COVID-19)


• Final decision during spring 2022

• If written exam:
– written exam only in English!
– But, you can of course answer in Norwegian!

• Note: slides marked with EXTRA is supplemental


material, meaning not relevant for exam questions
About the lectures and labs

• 2 lecture hours per week.


• 4 (bachelor) / 5 (master) lab assignments.

Saturday: 08 - 18 if access card without code


Sunday : only if you have access card with code
Lectures & lab
Only the page FYS3240 is updated!

No information added her!


See Timeplan and Canvas!

Labs adapted for use of own


computer
Lecture plan - see FYS3240

We start with digital lectures. They are pre-recorded and


available for playback from Timeplan.
Questions (lectures, software etc.)

• Use Canvas
– Diskusjoner
Introduction to data acquisition & control
Data Acquisition (DAQ) & Control Systems
• The main application domain for Real-Time and Embedded
computer systems is within Data Acquisition and Control.
• A dish washer system reads data from a timer, temperature and
water level sensors, and controls the water valves and heater.

• Data acquisition involves collecting signals from measurement


sources and digitizing the signal for storage, analysis and
presentation.
– For a closed-loop control system the acquired and processed data
are also utilized for controlling the process through a feedback
loop.
Data acquisition and control - examples
Autonomous cars
CERN ALICE DAQ

Drones Drone swarm

CubeSat
New high performance sensors and buses
• Examples:
– 4k cameras
• A 4096 x 3000 pixel colour camera operated at 50 Hz will generate about 615
MB/s with 8 bit Bayer coding, and about 2500 MB/s with RGB coding.
– 10 Gbit/s (1250 MB/s) Ethernet.

• Problem:
– SATA III gives only a 6 Gbit/s = 750 MB/s connection for a hard drive or SSD.
• Effectively only 600 MB/s due to 8/10 decoding.
– Need a faster interface to SSD for high speed storage!

• Solutions:
– SATA Express gives 1969 MB/s
– The M.2 NVMe interface for SSD use PCI Express x4.
– For instance, the Samsung 970 EVO 1 TB M.2 NVMe SSD provide write speed
up to 2500 MB/s, and the price is about 2500 NOK (feb. 2019).
Computer-based DAQ system
FYS3240/4240

• Configuration
• Signal processing
• Display
• Data Storage
• Data playback

• PCI/PCIe DAQ card

• USB DAQ box

• PXI DAQ system


• …..
Today – consumer products

Embedded systems
Aerospace & Defence

1968

ABS Entertainment system

An embedded system is UAV/UAS


typically a single-purpose
system with real-time
“The first embedded computing constraints.
computer systems”
Unmanned Aircraft System (UAS) example
IMU: Inertial Measurement Unit

DAQ Control law


Missile Guidance, navigation & control
(GNC) example
Estimator Control

IMU data used in


feedback loops

The output from an estimator is used as input to the control algorithm.


Why do we need an estimator?
• Very often sensors do not measure directly what we need
– An IMU measure acceleration and angular rate.
– For navigation we want to determine position and orientation
angles …

• Every sensor have errors and noise!

• Need multi-sensor data fusion to build accurate and robust


systems!
– different sensors have different sample rate and accuracy.
GNSS (GPS)-denied environments are
everywhere

Data fusion of IMU and GNSS (GPS) data (+ other sensors)


GNSS (GPS)-denied environments II
Indoor positioning
• IMU is one of the sensors in use!

Figure from
Autonomous underwater vehicles (AUVs) https://www.geoawesomeness.com/the-
evolution-of-indoor-navigation-
technologies/
MEMS for navigation - miniaturization

 MEMS
sensors are
everywhere!

MEMS = micro-electro-mechanical systems


MEMS sensors
Small & low-cost
Stability issues
Position, navigation & timing (PNT)

• PNT is important in
many applications!

• One lecture dedicated


to time and
synchronization

På rett sted til rett tid (regjeringen.no)


Lab information
We will use Arduino Nano 33 BLE sense

• ARM Cortex M4
• Inertial measurement unit (IMU)
– 3-axis accelerometer
– 3-axis rate gyroscope
• 3-axis magnetometer
BLE
• Bluetooth low energy (BLE)
USB

• + many other sensors


PC with
LabVIEW

https://www.arduino.cc/en/Guide/NANO33BLESense
Nano 33 BLE sense

Figure from Arduino Nano 33 BLE Sense Review - What's New and How to Get Started? (circuitdigest.com)
An Inertial measurement unit (IMU)
can for instance be used for
• Navigation
• Airbags and stability control systems for cars
• Tracking motion in consumer electronics such as cell phones
and video game remotes
• Detecting screen rotation in smartphones and tablets
• Measure movement (steps) in fitness trackers (activity bands).
• Following a user’s head movements in AR (augmented reality).
• Maintaining a drone’s balance.
• Improving the heading (azimuth) of your robot vacuum cleaner
• Platform stabilization in video cameras
• ++
Lab equipment
• Pick up from Ekspedisjonen, room V144, Fysikkbygningen
– See Canvas for more information when the kit is available.
– You need to sign for the equipment and deliver it back before the
exam.
• The following equipment are available:
• Arduino Nano 33 BLE sense
• Cable USB-A to USB-B-micro
• BLE USB adapter (BLED112-V1) – primarily for FYS4240

• You also need a PC (and preferably a webcam & microphone).


– A few USB webcams are available if required (contact Vegard
Munkeby Joten).
About the lab/project work
• Lab 1: LabVIEW basics
– Learn basic application development with LabVIEW.

• Lab 2: PC-based DAQ with LabVIEW


– Read data from a simulated DAQ-box and save to binary file (parallel programing).

• Lab 3: Arduino basics, sensors & serial communication


– Accelerometer, gyroscope and magnetometer – understand sensor errors.
– Understand serial communication.

• Lab 4: Use of IMU & magnetometer sensors


– Tilt-sensor using accelerometer.
– Tilt-compensated magnetic compass.
– Magnetometer calibration
– Understand IMU datasheet & library.

• Lab 5: Project for Master students (FYS 4240)


– Send IMU-data to a PC using BLE, and transmit the data to “another PC” using
UDP.
Install LabVIEW on own PC – official
solution
• Go to https://www.winprog.uio.no/
• Select LabVIEW

Seems to be an
older version of
LabVIEW
A better approach for installing
LabVIEW ….
• Download newest version
(2021) from LabVIEW
Download – NI

• Windows,
Base/Full/Professional, 32-
bit, driver software included
Yes.

• Click Download

• Apply the UIO license key


J10X48798 to activate the
software
– Key found in link on
previous slide See more about installation on Canvas!
What about LabVIEW for Linux or
Mac?

• LabVIEW for Mac and Linux is not supported by the UIO license
– Run LabVIEW for Windows in a virtual machine!

• Use Boot Camp to natively run Microsoft Windows 10 on a machine


running Mac OS X.

• For Linux a WMware virtual machine should be possible to use.


Background
Working with data acquisition
• To acquire data from a sensor (hardware) a device driver or an
API (Application Programming Interface) must be available.

• We will use Arduino and LabVIEW.


– Required device drivers and APIs (libraries) are available for
communication with sensors and a computer!
– We can focus on application development and sensor data
processing!
• Arduino is used to send sensor data to a computer for
processing, display and recording
– We will also do some calculations on the Arduino.

• We can “easily” make advanced programs on the computer


• Parallel programing
• Advanced signal processing
• GUI
Working with inertial sensors
Requires knowledge about:
• Navigation mathematics
• The Earths magnetic field and gravity field
• Sensor errors
• Sensor modelling
• Sensor calibration
• Data fusion (to combine data from different sensors)
– Estimation
– Least squares estimator
– Kalman filter
• How inertial sensors can be used in control systems

You will learn the principles and fundamentals in this course!


Inertial sensor performance - gyros
Consumer
grade

R&D programs to increase


MEMS performance!

Low cost gyros

Navigation grade typically needed for navigation in GNSS (GPS)-denied environments

A low-cost gyro is “useless” for navigation without additional signal processing!


What we will do
• We will read and process data from the
IMU and magnetometer on the Nano
33 board.

• We will transfer data from the Arduino


board to a PC using serial
communication over USB (and BLE).
BLE

USB
• We will program in Arduino IDE and
LabVIEW.
PC with
• The lectures explain how an IMU LabVIEW
works and in detail how it can be used
for navigation, attitude determination
and control (in 2D and 3D).

You might also like