%S = Home =[home]
%xhtmls% ''' <div style="margin-top: 10%; text-align: center; font-size: 1.3em;">
-Simulink coder target for automotive rapid prototyping platform
+Simulink Coder^^(TM)^^ target for automotive rapid prototyping platform
%xhtmls% ''' </div>
-[300-logos.png]
+[400-logos.png]
= Agenda =[agenda]
- Background.
+
- About Simulink.
+
- Things developed.
- - C Library.
- - Simulink Target.
+
+ - C Support Library.
+ - Simulink Coder Target.
- Simulink Block Set.
- Demos.
+
- Questions.
= Background =[background]
+Back in the beginning of 2012 a leading automotive company (Porsche) requested the Czech Technical
+University to develop a Engine Control Unit (ECU) for automotive applications.
+
+Real-Time Systems group at the Department of Control Engineering from the Faculty of Electrical
+Engineering (a.k.a //next door//) developed a hardware and Software platform to the needs of this
+industry (a.k.a //RPP// for Rapid Prototyping Platform).
+
+The hardware uses Texas Instruments TMS570LS3137 (pretty nifty CPU for automotive applications) and
+is built with automotive standards and interfaces in mind.
+
+It uses a real-time operating system and is (was) directly programmed in C.
+
+= Background (cont.) =[background_cont]
+
+[400-board.png]
+
+= Background (cont. I) =[background_cont_i]
+
+Nevertheless, hand written C code is:
+
+- Hard to produce, sometimes very low-level.
+- Hard to debug. Yes, 1 bit took us 4 hours.
+- Requires good knowledge of the underlying hardware.
+- Most of the time is non-portable or hard to port between platforms.
+- Hard to audit and certify.
+
+
+
+= Background (cont. II) =[background_cont_ii]
+
+Because of this the company has the policy to implement the Software for their system using
+**Model-Based Design**, which is a way to address these problems:
+
+%xhtmls% ''' <div style=" text-align: center; font-style: italic;margin: 0 10% 0 10%;">
+"Model-Based Design (MBD) is a mathematical and visual method of addressing problems associated
+with designing complex control, signal processing and communication systems. It is used in many
+motion control, industrial equipment, aerospace, and automotive applications. Model-based design
+is a methodology applied in designing embedded software."
+
+%xhtmls% ''' </div>
+Or in other words, they use the Software **Simulink** for implementing their systems.
= About Simulink =[about_simulink]
+%xhtmls% ''' <div style=" text-align: center; font-style: italic;margin: 0 10% 0 10%;">
+"Simulink, developed by MathWorks, is a data flow graphical programming language tool for modeling,
+simulating and analyzing multidomain dynamic systems. Simulink is part of Matlab."
+
+%xhtmls% ''' </div>
+
+In other words, Simulink is a Software that allows to you create algorithms (systems) by connecting
+boxes. Each box is like a function, with inputs and outputs (with data type and arity).
+
+
+
+= About Simulink (cont.) =[about_simulink_cont]
+
+Oversimplifying, it is composed by two things:
+
+- **Diagramming environment**: Were you draw your algorithm. No more different that UML or
+ standard diagramming tools.
+
+- **Block libraries**: a library with lots of blocks that do something:
+
+ - //Operations//: for example logical operations (OR, NOT, AND, etc), data type conversion,
+ integration, sum, product (remember arity), etc.
+
+ - //Sources//: generate data for the model, like and pulse generator, signal repeater, wave
+ generator, etc.
+
+ - //Skins//: blocks that outputs the results of the model. Few examples, like oscilloscope or
+ XY gratification.
+
+
+
+= About Simulink (cont. I) =[about_simulink_cont_i]
+
+[800-simulink_gui.png]
+
+= About Simulink (cont. II) =[about_simulink_cont_ii]
+
+The program or system developed with Simulink is referred as a **model**.
+The models can be "compiled" to C code (code generation) using the //Simulink Coder// product.
= Things developed =[things_developed]
-- **C Library**: @@
+- **C Support Library**: @@
Define the API to communicate with the board. Include drivers and operating system.
-- **Simulink Target**: @@
- Allows Simulink model's code generation, compilation and download to the board.
+- **Simulink Coder Target**: @@
+ Allows Simulink model's code generation, compilation and download for the board.
- **Simulink Block Set**: @@
Set of blocks that allows Simulink models to use board IO and communication peripherals.
Just a bunch of examples of control application in form of Simulink models.
-== C Library ==[c_library]
+== C Support Library ==[c_support_library]
Characteristics:
=== Library - Layers ===[library___layers]
-[layers.png]
+[500-layers.png]
=== Library - Modules ===[library___modules]
-[blocks.png]
+[500-blocks.png]
=== Library - Modules implemented ===[library___modules_implemented]
- Other minor control and support files.
-Simulink generates code for almost all the standard blocks. But the model needs a way
-to output the results or input data so new blocks for board IO needed to be implemented.
+Simulink generates code for almost all the standard blocks. But the model needs a way to output
+the results or input data so new blocks for board IO needed to be implemented.
== Simulink Block Set ==[simulink_block_set]
- Validation of parameters (things like range and datatype).
-It can be used also for the block to do something within Simulink. Right now they are just descriptors.
+It can be used also for the block to do something within Simulink. Right now they are just
+descriptors.
=== Simulink Block Set - TLC file ===[simulink_block_set___tlc_file]
- Log each second the data read on one analog input.
- Others.
-== Demos - H-Bridge Analog Control ==[demos___h_bridge_analog_control]
+=== Demos - H-Bridge Analog Control ===[demos___h_bridge_analog_control]
[demo_hbridge_analog_control.png]
<div id="section1" class="section">
<div style="margin-top: 10%; text-align: center; font-size: 1.3em;">
<p>
-Simulink coder target for automotive rapid prototyping platform
+Simulink Coder<sup>(TM)</sup> target for automotive rapid prototyping platform
</p>
</div>
<p>
-<img style="display: block;margin: 0 auto 0 auto;" width="300" src="media/images/logos.png" alt=""/>
+<img style="display: block;margin: 0 auto 0 auto;" width="400" src="media/images/logos.png" alt=""/>
</p>
</div>
<ul>
<li>Background.
+<p></p>
</li>
<li>About Simulink.
+<p></p>
</li>
<li>Things developed.
+<p></p>
<ul>
- <li>C Library.
+ <li>C Support Library.
</li>
- <li>Simulink Target.
+ <li>Simulink Coder Target.
</li>
<li>Simulink Block Set.
</li>
<li>Demos.
+ <p></p>
</li>
</ul>
</li>
<h1 id="background">Background</h1>
+<p>
+Back in the beginning of 2012 a leading automotive company (Porsche) requested the Czech Technical
+University to develop a Engine Control Unit (ECU) for automotive applications.
+</p>
+<p>
+Real-Time Systems group at the Department of Control Engineering from the Faculty of Electrical
+Engineering (a.k.a <em>next door</em>) developed a hardware and Software platform to the needs of this
+industry (a.k.a <em>RPP</em> for Rapid Prototyping Platform).
+</p>
+<p>
+The hardware uses Texas Instruments TMS570LS3137 (pretty nifty CPU for automotive applications) and
+is built with automotive standards and interfaces in mind.
+</p>
+<p>
+It uses a real-time operating system and is (was) directly programmed in C.
+</p>
</div>
<div id="section4" class="section">
-<h1 id="about_simulink">About Simulink</h1>
+<h1 id="background_cont">Background (cont.)</h1>
+<p>
+<img style="display: block;margin: 0 auto 0 auto;" width="400" src="media/images/board.png" alt=""/>
+</p>
</div>
<div id="section5" class="section">
+<h1 id="background_cont_i">Background (cont. I)</h1>
+
+<p>
+Nevertheless, hand written C code is:
+</p>
+
+<ul>
+<li>Hard to produce, sometimes very low-level.
+</li>
+<li>Hard to debug. Yes, 1 bit took us 4 hours.
+</li>
+<li>Requires good knowledge of the underlying hardware.
+</li>
+<li>Most of the time is non-portable or hard to port between platforms.
+</li>
+<li>Hard to audit and certify.
+</li>
+</ul>
+
+</div>
+
+<div id="section6" class="section">
+
+<h1 id="background_cont_ii">Background (cont. II)</h1>
+
+<p>
+Because of this the company has the policy to implement the Software for their system using
+<strong>Model-Based Design</strong>, which is a way to address these problems:
+</p>
+<div style=" text-align: center; font-style: italic;margin: 0 10% 0 10%;">
+<p>
+"Model-Based Design (MBD) is a mathematical and visual method of addressing problems associated
+with designing complex control, signal processing and communication systems. It is used in many
+motion control, industrial equipment, aerospace, and automotive applications. Model-based design
+is a methodology applied in designing embedded software."
+</p>
+</div>
+<p>
+Or in other words, they use the Software <strong>Simulink</strong> for implementing their systems.
+</p>
+</div>
+
+<div id="section7" class="section">
+
+<h1 id="about_simulink">About Simulink</h1>
+
+<div style=" text-align: center; font-style: italic;margin: 0 10% 0 10%;">
+<p>
+"Simulink, developed by MathWorks, is a data flow graphical programming language tool for modeling,
+simulating and analyzing multidomain dynamic systems. Simulink is part of Matlab."
+</p>
+</div>
+<p>
+In other words, Simulink is a Software that allows to you create algorithms (systems) by connecting
+boxes. Each box is like a function, with inputs and outputs (with data type and arity).
+</p>
+</div>
+
+<div id="section8" class="section">
+
+<h1 id="about_simulink_cont">About Simulink (cont.)</h1>
+
+<p>
+Oversimplifying, it is composed by two things:
+</p>
+
+<ul>
+<li><strong>Diagramming environment</strong>: Were you draw your algorithm. No more different that UML or
+ standard diagramming tools.
+<p></p>
+</li>
+<li><strong>Block libraries</strong>: a library with lots of blocks that do something:
+<p></p>
+ <ul>
+ <li><em>Operations</em>: for example logical operations (OR, NOT, AND, etc), data type conversion,
+ integration, sum, product (remember arity), etc.
+ <p></p>
+ </li>
+ <li><em>Sources</em>: generate data for the model, like and pulse generator, signal repeater, wave
+ generator, etc.
+ <p></p>
+ </li>
+ <li><em>Skins</em>: blocks that outputs the results of the model. Few examples, like oscilloscope or
+ XY gratification.
+ </li>
+ </ul>
+</li>
+</ul>
+
+</div>
+
+<div id="section9" class="section">
+
+<h1 id="about_simulink_cont_i">About Simulink (cont. I)</h1>
+
+<p>
+<img style="display: block;margin: 0 auto 0 auto;" width="800" src="media/images/simulink_gui.png" alt=""/>
+</p>
+</div>
+
+<div id="section10" class="section">
+
+<h1 id="about_simulink_cont_ii">About Simulink (cont. II)</h1>
+
+<p>
+The program or system developed with Simulink is referred as a <strong>model</strong>.
+</p>
+<p>
+The models can be "compiled" to C code (code generation) using the <em>Simulink Coder</em> product.
+</p>
+</div>
+
+<div id="section11" class="section">
+
<h1 id="things_developed">Things developed</h1>
<ul>
-<li><strong>C Library</strong>: <br />
+<li><strong>C Support Library</strong>: <br />
Define the API to communicate with the board. Include drivers and operating system.
<p></p>
</li>
-<li><strong>Simulink Target</strong>: <br />
- Allows Simulink model's code generation, compilation and download to the board.
+<li><strong>Simulink Coder Target</strong>: <br />
+ Allows Simulink model's code generation, compilation and download for the board.
<p></p>
</li>
<li><strong>Simulink Block Set</strong>: <br />
</div>
-<div id="section6" class="section">
+<div id="section12" class="section">
-<h2 id="c_library">C Library</h2>
+<h2 id="c_support_library">C Support Library</h2>
<p>
Characteristics:
</div>
-<div id="section7" class="section">
+<div id="section13" class="section">
<h3 id="library___layers">Library - Layers</h3>
<p>
-<img style="display: block;margin: 0 auto 0 auto;" src="media/images/layers.png" alt=""/>
+<img style="display: block;margin: 0 auto 0 auto;" width="500" src="media/images/layers.png" alt=""/>
</p>
</div>
-<div id="section8" class="section">
+<div id="section14" class="section">
<h3 id="library___modules">Library - Modules</h3>
<p>
-<img style="display: block;margin: 0 auto 0 auto;" src="media/images/blocks.png" alt=""/>
+<img style="display: block;margin: 0 auto 0 auto;" width="500" src="media/images/blocks.png" alt=""/>
</p>
</div>
-<div id="section9" class="section">
+<div id="section15" class="section">
<h3 id="library___modules_implemented">Library - Modules implemented</h3>
</div>
-<div id="section10" class="section">
+<div id="section16" class="section">
<h2 id="simulink_target">Simulink Target</h2>
</ul>
<p>
-Simulink generates code for almost all the standard blocks. But the model needs a way
-to output the results or input data so new blocks for board IO needed to be implemented.
+Simulink generates code for almost all the standard blocks. But the model needs a way to output
+the results or input data so new blocks for board IO needed to be implemented.
</p>
</div>
-<div id="section11" class="section">
+<div id="section17" class="section">
<h2 id="simulink_block_set">Simulink Block Set</h2>
</p>
</div>
-<div id="section12" class="section">
+<div id="section18" class="section">
<h3 id="simulink_block_set___anatomy">Simulink Block Set - Anatomy</h3>
</div>
-<div id="section13" class="section">
+<div id="section19" class="section">
<h3 id="simulink_block_set___c_mex_s_function">Simulink Block Set - C-MEX S-Function</h3>
</ul>
<p>
-It can be used also for the block to do something within Simulink. Right now they are just descriptors.
+It can be used also for the block to do something within Simulink. Right now they are just
+descriptors.
</p>
</div>
-<div id="section14" class="section">
+<div id="section20" class="section">
<h3 id="simulink_block_set___tlc_file">Simulink Block Set - TLC file</h3>
</p>
</div>
-<div id="section15" class="section">
+<div id="section21" class="section">
<h3 id="simulink_block_set___process">Simulink Block Set - Process</h3>
</p>
</div>
-<div id="section16" class="section">
+<div id="section22" class="section">
<h2 id="demos">Demos</h2>
</div>
-<div id="section17" class="section">
+<div id="section23" class="section">
-<h2 id="demos___h_bridge_analog_control">Demos - H-Bridge Analog Control</h2>
+<h3 id="demos___h_bridge_analog_control">Demos - H-Bridge Analog Control</h3>
<p>
<img style="display: block;margin: 0 auto 0 auto;" src="media/images/demo_hbridge_analog_control.png" alt=""/>
</p>
</div>
-<div id="section18" class="section">
+<div id="section24" class="section">
<h1 id="questions">Questions?</h1>