Title: Multitasking Extension of Processor in the Loop PIL Simulation
1Multitasking Extension of Processor in the Loop
(PIL) Simulation
- Presented by
- Santiago Lentijo
2Outline
- PIL Definition
- PIL Features
- New Feature Multitasking Capability
- Application Example
- Conclusion
3PIL Definition
- The PIL is a testing procedure for
micro-controller based control where the real
final target is adopted for software testing. - The control software interacts with a simulated
model of the plant (no real-time constraint)
4System Structure of PIL Simulation
5PIL Simulation
6PIL Features
- Independency between the blocks used in VTB and
the processor used for the control. - The communication software is modular, easy to
customize to any number of inputs and outputs. - Time length of the control algorithm. (Digital
Output, VTB Viewable). - Delay equal to the time length of the control
algorithm. - Problems related to the resolution of your
processor (16 bits, 32 bits, fixed point).
7New Features
- Multitasking capability multiple tasks may be
executed, apparently simultaneously, on a single
processor. - Time step independency and event scheduling the
master simulator has to be able to do an
intelligent step management, including time
increment steps, state roll-back and adjustment
of the time step.
8PIL Testing Procedure
9Application Example DC Motor Speed Current
Control
10Controller Design
- The DC motor can be represented as
PI Controllers
PI Parameters
11VTB PIL Results Step change of the reference
speed
Motor Speed VTB Result ?15.2µs
Motor Speed PIL Result ?15.5µs
12PIL Experimental Results Step change of the
reference speed
Motor Speed PIL Result ?15.5µs
Motor Speed Experimental Result ?16.15µs
13PIL Results ISampling Instants
- Task 1 is the Speed PI called every 3 ms
- Task 2 is the Current PI called every 0.3 ms
14PIL Results II Time length of the control
algorithm
- Task 1 is the Speed PI Maximum Time 189 µs
- Task 2 is the Current PI Maximum Time 155 µs
15PIL Results IIIMicrocontroller Memory Usage (In
percentage )
Max 69
16Conclusions
- PIL is a new procedure for virtual prototyping at
signal coupling level. - PIL allows the user to check the control software
running together with a simulated model of the
plant. - PIL is not performed in real-time, but allows the
measurement of important quantities such as
execution time and memory usage that can increase
confidence in the control software before the
final testing.
17