Presentation by Finn Haugen at NI Day 2007 in Drammen, Norway, March 8, 2007:
Examples of Student Assignments on Modeling, Simulation, and Control
This document and the linked files are available at http://techteach.no/presentations/. (The files may be updated at any time.)
A few words about my background (http://techteach.no):
The author has been teaching mathematical modeling, simulation and control for about 20 years in both bachelor and master studies. Here he presents and gives demonstrations of some successful students assignments within this area. Theory and practice are combined in an efficient way thanks to powerful graphical software tools which are well integrated with I/O hardware connected to physical processes. This efficient combination of theory and practice motivates and enhances students teaching. In the assignments presented, hardware and software tools by National Instrumentsí are used.
Let us take a look at a number of student assignments!
Example of HIL-simulation: A Fuji PYX5 PID controller controls a simulated first order plus time-delay process
At Buskerud University College the students develop a system for hardware-in-the-loop simulation:
Fuji PYX5 Process Controller
The Fuji controller controls a simulated process. The simulator runs in real time and is implemented in LabVIEW Simulation Module running on a PC:
PC with LabVIEW Simulation Module
The analog control signal from the Fuji controller controls the simulated process via one of the analog input channels on the USB-6008 device, and the simulated process measurement signal is connected to the controller via one of the analog output channels on the USB-6008 device.
Here is the simulator:
Example of HIL-simulation: A Simatic PLC controls a simulated drill
Master student Tommy Andersen (Telemark University College) now implements the following HIL system which we hope to use in PLC courses:
Simatic PLC (S7-300)
Front panel of simulated drill implemented in LabVIEW Simulation Module on a PC:
Sequential control program implemented in Graph7 in the PLC:
Sequential control program implemented in Graph7
The PLC and the PC with LabVIEW drill simulator communicates using OPC (OLE for Process Control), see the figure below:
OPC based communicatioin between LabVIEW and Simatic PLC
Example: Implementation of a practical PI(D) controller function
In the master study at Telemark University College the students implement a practical PI(D) controller having
The controller is implemented in Formula Node in LabVIEW:
Student's PI controller
The PID controller is tested against both a simulated and a real process.
Example: Modeling of a liquid tank
At Telemark University College students develop two different kinds of mathematical models of the liquid tank shown below:
When a models is accurate, a control system can be designed and/or analyzed using the model.
Example: Simulation of a ship dynamic positioning system
At Buskerud University College students implement a simulator of a ship dynamic positioning system in LabVIEW Simulation Module:
Ship dynamic positioning system
To limit the task, only the surge position is simulated:
Motion coordinates of a ship
We have got real parameter values of a test ship from Konsberg Maritime. The model is as follows (only the first of the three differential equations is considered):
Mathematical model of ship
A PID controller is implemented. The controller includes feedforward from estimated water current (uc) which is estimated by a Kalman Filter. The inbuilt PID Advanced function is used. The Kalman Filer is implemented in Formula node. The Kalman Filter gain is calculated used the Kalman Gain function of Control Design Toolkit.
The Kalman Filter equations:
Example: Simulation of a clutch servo
Students at Buskerud University College implement a simulator of a clutch positional servo based on a mathematical model given by Konsberg Automotive. The mathematical model to be implemented in LabVIEW Simulation Module is as follows:
Below is the front panel of one implementation:
Front panel of the clutch servo simulator
Example: The load torque of a DC motor is estimated with a Kalman Filter
The underlying mathematical model:
y=[1/(T*s+1)]*(K*u + L)
where y is tachometer voltage, u is control voltage, and is load torque (in equivalent voltage). K is the gain, and T is the time constant.
An equivalent state-space model: Define x1 = y, and x2 = L. Assuming that x2 = L is (almost) constant, the model becomes
T*dx1/dt = -x1 + K*u + x2
dx2/dt = 0
y = x1
The Kalman Filter equations: General form:
In our example, using the Euler forward method for discretization, the Kalman Filter equations are:
These equations are implemented in a Fromula Node. The Kalman Filter gain is calculated used the Kalman Gain function of Control Design Toolkit.
Front panel and block diagram of kalmanfilter_dcmotor_usb_io_sim.vi
In the above application two files are involved. They are zipped into this file: kalmanfilter_dcmotor_usb_io_sim.zip