Modeling and Automation of Industrial Processes

Modelação e Automação de Processos Industriais - MAPI




Integrated Master's degree in Electrical and Computer Engineering

Systems, Decision and Control Area




2nd Semester 2021/2022


Prof. José Gaspar

jag (at) isr.tecnico.ulisboa.pt

21 8418293 Ext. 2293






Last update: 23rd June 2022


Link to the page in Fenix: https://fenix.tecnico.ulisboa.pt/disciplinas/MAPI/2021-2022/2-semestre

Link to previous year: http://users.isr.ist.utl.pt/~jag/courses/api20b/api2021.html

Link for attending classes: https://fenix.tecnico.ulisboa.pt/disciplinas/MAPI/2021-2022/2-semestre/---videoconference





22.06.2022 - Doodle to select presentation slot.

13.06.2022 - Spreadsheet link to register paper to present (see link at Lab3 section, bellow)

13.06.2022 - Published part B of the second laboratory work.

13.06.2022 - Published part A of the second laboratory work.

13.06.2022 - Lab3 guide for paper presentation.

19.05.2022 - Published part C of the first laboratory work.

19.05.2022 - Published part B of the first laboratory work.

19.05.2022 - Published part A of the first laboratory work.

09.05.2022 - Laboratory grades obtained in the previous two years are valid for the current school year.




Course Objectives:



The MAPI course is intended to provide students with the ability to solve automation problems. To this end, methodologies for analysis and synthesis of discrete event systems are studied, in the form of supervisory controllers that are implemented in industrial devices. Training on the following components will be deepened:




Systems analysis for industrial automation.


Methodologies for the implementation of solutions in industrial automation.


Programmable Logic Controllers (PLCs) Languages.


Computer Numerical Control (CNC) machines.


Modeling Discrete Event Systems (DESs).


Supervision of Industrial Automation Processes.







Ch. 1a - Introduction to the course and to the PLCs Programmable Logic Controllers (PLCs) components. PLC internal structure and operation. Input and output interfaces. Interconnection between PLCs.

Ch. 1b - PLCs Programming Languages Ladder diagrams; Structured Text. Description of the components of a typical language. Flow control structures. Development environments. Networking PLCs. Common programming errors.

Ch. 1c - GRAFCET standard. modeling techniques. Development environment. Interpretation of GRAFCET using Ladder. PLCs network security.

Ch. 2 - Discrete Event Systems Discrete Event System Modeling (DESs). Automata, languages. Petri nets: dynamics and modeling. Restricted and extended models. Network subclasses. Petri nets properties. Exercises and solutions.


Ch. 3. Stochastic models Stochastic Petri Nets (SPN). Stochastic Queuing Networks (SQN). Slides.

Ch. 4. Stochastic analysis Markov chain modelling of SPN and SQN. Slides.


Ch. 5. Control (MDPs in continuous time)

Ch. 6. Supervisors and Fluid models Methodologies for supervision. Synthesis based on invariants. Examples of application. Slides 1 (SCADA), slides 2 (mutual excl.) and slides 3 (generalized).


Ch. 7. Case studies (connection to Industry and Services)




Exams from previous years:


Exams from 2004/5 to 2012/13 in PDF.

1st exam of 2013/14 in PDF. 2nd exam of 2014/15 in PDF. 1st exam of 2015/16 in PDF.

1st exam of 2016/17 in PDF. 1st exam of 2017/18 in PDF.1st exam of 2018/19 in PDF.

1st exam of 2019/20 in PDF

1st exam of 2020/21 in PDF .


Solution of 2nd exam 2006/7 in PDF.

Solution of 2nd exam 2012/13 in PDF



Laboratory Work:


(to be completed throughout the semester)


PLC hardware and software / programming manuals:
SW Unity Intro ,
SW Unity Reference,
HW IO Module.
Extra SW Unity Standard Library Reference (available also under the software menu help).

PLC experiments:
Memory data dump
Unity Project and Matlab plot (written for P57 1634 with 28FK in slot3)

Software for programming PLCs
[Going to use Schneider's Unity Pro V13]


Software installed in the lab that can also be used at home:

[Instructions for Windows]
Install an SVN client, e.g. the freeware TortoiseSVN ** including its command line tools **.
A reboot may be required after installing TortoiseSVN.

Matlab run the following lines:
% the next line is long (ends at \mapi)
!svn co  --username mapi2122 --password automation svn://svn.isr.tecnico.ulisboa.pt/dccal/projects/lsdc4_mapi c:\users2\mapi
cd c:\users2\mapi\_init_all

% in the future just run login_mapi



Guide for part A of the First Laboratory Work, in Word format.

Guide for part B of the First Laboratory Work, in Word format.

Guide for part C of the First Laboratory Work, in Word format.

Software to support the first work:
PLC data logging
webpage (click here)



Guide for part A of the Second Laboratory Work, in Word format.

Guide for part B of the Second Laboratory Work, in Word format.

Software to support the second work:
See the SVN helping the course (more info some paragraphs before this one)



Guide for the Third Laboratory Work - Presentation, in PDF.

Doodle to select a presentation time slot, click here.
Spreadsheet for registering the presentation title, click here.

Suggested sources of information:
Finding a paper to present
Finding an alternative work to present
OpenPLC testing on Arduino or Raspberry-pi.
(iv) Topics from previous industrial automation courses


Laboratory Papers, Presentation of Seminars:

Doodle, presentations schedule, click here.



Laboratory registration:

[to be filled later]


Floor plan of the laboratory: click here to see it.



Labs and first exam, click here.