Learning objectives
The course aims to provide students with the basic skills required to use MATLAB software as a support tool for the analysis, design, and simulation of electronic and measurement systems.
Students should be able to apply the knowledge acquired to solve simple problems involving the acquisition, analysis, and processing of experimental data, using MATLAB for the numerical processing of signals, the graphical representation of results, and the evaluation of the performance of algorithms and measurement systems.
Students should also be able to clearly communicate and document the design and methodological choices made, through well-structured, readable, and commented code, as well as through the presentation of the results obtained.
MATLAB/Simulink will also be used for the modelling, simulation, and verification of electronic and measurement systems, referring to application examples consistent with the prior knowledge acquired by students in previous basic courses.
Examples of automatic code generation for different hardware platforms, such as microcontrollers and FPGAs, will be addressed, with particular reference to the implementation of acquisition, processing, and control algorithms in embedded measurement systems.
In particular, by the end of the course, students should be able to:
work in the MATLAB environment, understanding the main available data types and how to manipulate vectors, matrices, signals, and experimental data sets;
import, visualise, analyse, and process measurement data, including data obtained from experimental acquisitions or simulations, using MATLAB functions and specific toolboxes;
develop procedures for the numerical processing of signals and measurements, including filtering, interpolation, regression, parameter estimation, and performance evaluation;
solve equations and mathematical models relevant to the description of physical systems, sensors, circuits, and measurement chains using MATLAB and Simulink;
design, model, and simulate electronic and measurement systems using MATLAB/Simulink, analysing their behaviour under assigned operating conditions;
represent and model flow diagrams, control logic, and finite-state machines using Stateflow, with reference to applications involving acquisition, control, and management of acquired data.
Prerequisites
Basics concepts about electrical circuits, electronics, signal theory and programming taught in previous courses.
Course unit content
The course is dedicated to the use of the MATLAB software as a support to electronic design, both as regards the analysis of data both as regards the systems design, modeling and simulation, hardware connection and code generation
Topics include:
1. The MATLAB environment with application examples
2. The SIMULINK environment with application examples
3. Hardware connection and code generation
Full programme
1. THE MATLAB ENVIRONMENT – GENERAL OVERVIEW (24 hours)
1.1. Working environment: Workspace, Command Window, Current Folder. Documentation.
1.2. Editor, scripts, functions, debugging, reports, and code performance.
1.3. Numeric data type and main operators: vectors and matrices, arithmetic operators, logical operators, concatenation, indexing.
1.4. Polynomials and interpolation.
1.5. Other data types: char, cells, tables, structures, datetime and duration, logical, categorical data, considerations on data conversion and memory usage.
1.6. Conditional statements and loops.
1.7. Data input/output.
1.8. Data visualisation.
2. THE SIMULINK ENVIRONMENT – GENERAL OVERVIEW (2 hours)
2.1. Model creation.
2.2. Model simulation.
2.3. Analysis of simulation results.
2.4. Data import from MATLAB: fixed-point vs floating-point notation.
2.5. Creation of subsystems and masks.
3. SIMULATION OF CIRCUITS AND SYSTEMS WITH SIMULINK (2 hours): Simscape.
4. SOLVING EQUATIONS (5 hours)
4.1. Solving symbolic equations with MATLAB.
4.2. Solving numerical equations with MATLAB.
4.3. Solving equations with Simulink.
5. ANALYSIS OF CONTINUOUS-TIME LTI SYSTEMS (2 hours)
5.1. Continuous-time LTI systems in MATLAB, symbolic and numerical analysis: Laplace transform and transfer function, step response, impulse response, response to a generic signal, frequency response: Bode diagrams, pole-zero analysis, parametric analysis.
5.2. Continuous-time LTI systems in Simulink.
6. ANALYSIS OF DISCRETE-TIME LTI SYSTEMS (2 hours)
6.1. Discrete-time LTI systems in MATLAB, symbolic and numerical analysis: Z-transform and transfer function, impulse response and response to a generic signal, frequency response and pole-zero analysis.
6.2. Discrete-time LTI systems in Simulink.
7. FFT (2 hours)
8. DESIGN OF IIR/FIR FILTERS (3 hours)
9. STATEFLOW (4 hours)
9.1. Flow diagrams.
9.2. Finite-state machines.
10. AUTOMATIC CODE GENERATION (2 hours)
10.1. C Coder.
10.2. HDL Coder.
10.3. Connection to hardware.
Bibliography
Stephen J. Chapman, Essentials of MATLAB Programming 3 ed., Cengage Learning, 2018, ISBN-13: 978-1305970656.
Brian H. Hahn, Daniel T. Valentine, Essential MATLAB for Engineers and Scientists, Academic Press, 2017, ISBN: 9780081008775
Teaching methods
24 lessons of 2 hours each.
The first part of the course will focus on general concepts, while the second part will provide knowledge of the most important toolboxes for the analysis, design, and simulation of electronic and measurement systems.
The topics covered will be illustrated through slides and exercises. The slides used and the exercises texts and solutions will be published on the Elly platform.
Assessment methods and criteria
Practical computer-based examination.
The examination will consist of two exercises. The first exercise will concern the processing of data provided by the instructor, which must be imported using one of the techniques presented during the course. Alternatively, students may be asked to generate data using one of the techniques covered in class. The imported or generated data must then be analysed and processed according to a specific algorithm provided in the examination text, and finally visualised.
In the second exercise, students will be required to set up and simulate a system using one of the techniques presented during the course, such as the solution of characteristic equations, circuit simulation, or other methods.
The written examination is graded on a scale from 0 to 32 out of 30. Honours are awarded when a score higher than 30/30 is achieved.
2030 agenda goals for sustainable development
The course contributes to the objectives of the 2030 Agenda for Sustainable Development by providing students with digital and technical skills useful for the analysis, design, simulation, and optimisation of electronic and measurement systems. Through the use of MATLAB/Simulink, students learn how to process experimental data, model systems, evaluate performance, and develop efficient algorithms, supporting innovation, responsible use of resources, and technological development.
In particular, the course is connected to Sustainable Development Goal 4, Quality Education, by strengthening students’ scientific, computational, and problem-solving skills; to Sustainable Development Goal 9, Industry, Innovation and Infrastructure, by promoting the use of advanced tools for the design and simulation of technological systems; and to Sustainable Development Goal 12, Responsible Consumption and Production, by encouraging the development of efficient solutions through modelling, simulation, and performance analysis before physical implementation.