Lesson finished
Up next: Electrical and Mechanical Elements, Ohm's Law and Simulink Blocks
Unlock all 13 lessons of Introduction to Physical Modeling using SimscapeFull course ₹40,000 · paid
Mathematical Modeling, Simulation and Block Diagrams
A free lesson from Skill-Lync's Introduction to Physical Modeling using Simscape course, on Grow by Skill-Lync · Last updated 16 Nov 2026 · Session: “Week 1 Session 1 - Introduction to modeling of complex systems - Part 1”
What will you learn in this free Introduction to Physical Modeling using Simscape lesson?
The instructor outlines the course topics and explains why planning needs a model, using a bridge and substation as examples. The lesson defines a model and a simulation, uses a flight simulator as an analogy, and turns sum equals A plus B (23 and 45) into a Simulink block diagram.
- Why projects need a mathematical model
- Difference between a model and a simulation
- Turning an equation into a block diagram
- Advantages of model-based design
What comes after lesson 2?
The next free lesson is lesson 3, “Electrical and Mechanical Elements, Ohm's Law and Simulink Blocks” (24 min). Later in Skill-Lync's Introduction to Physical Modeling using Simscape course (paid): lesson 4, Week 1 Session 2 - Introduction to modeling of complex systems; lesson 5, Week 1 Session 3 - Introduction to modeling of complex systems; lesson 6, Week 2 Session 1 - Simulation configurations & Simscape. The full course has 13 lessons (5 h 29 min of video); see the course overview or its price and syllabus.
Lesson transcript
Machine transcript of the lesson audio (lightly cleaned). Technical terms may contain errors; the video is the reference.
Hi, everyone. Welcome to the course of Simulink for Mechanical Engineers. In this course, you are going to learn about how you can use Simulink for mathematical modeling. This is the part one where we are going to learn about introduction to modeling of complex systems. Let's begin with what are course contents and what this course is about. This course will explain you about the importance of the mathematical modeling and why we should learn about it. We are going to have introduction of Simulink environment and how you can begin with the Simulink, how you can start from the first step, how you can open the Simulink, how you construct very fundamental diagrams and how to run the simulation and how to visualize the results.
So, this complete simulation process is going to be explained in this course. These models are going to be basic systems of mechanical and electrical systems. So, these models will be related to these two engineering disciplines. We are also going to learn about physical systems. We are also going to learn about physical system modeling using Seamscape. So, Seamscape is a different block set within the Simulink, which is very popular for electromechanical simulation. So, Seamscape involves the both cases where electrical and mechanical systems are simulated in co-existence or when electrical and mechanical both the systems are present in the same model.
We are also going to learn about the same model. We are also going to learn about Matlab and Simulink interface. So, if you have learned basic Matlab programming or script writing and running your program and execution of .m files, you can actually link with your Simulink model and we will learn about how to connect the script file with a model file. And last, we are also going to learn about how to implement the control logic with a state flow. So, state flow is another important Simulink feature or I will say a block set which will help you to realize how the control logic can be implemented and this can be clubbed with your model and you can learn how the control logic works in a simulated environment.
So, what are the course objectives? So, what are the course objectives? At the end of the course, you will be able to become familiar with Simulink and model based design. So, we are going to discuss what is a model based design and this is nothing but a system level or we can say a higher level design in a simulated environment. You will be able to start making beginner level models. You will be able to configure the model properties correctly and after you have hit the run button, you will be able to see the results as well and you will be able to make the post processing analysis.
So, how to analyze your result, how you can actually do the further saving of your result data, how you can generate a better report out of it or maybe if you want to transfer your data points into the Excel sheet, for example, you will be learning that as well. So, these are the main course objectives and let's start with importance of mathematical modeling. Why we need to do mathematical modeling. So, if you see this image, there are few civil engineers standing on the bridge and they are discussing something about what went wrong.
So, this is a bridge construction happening and this is not in line with the other end. Right. So, what is going to happen if the engineering projects are not planned and not executed properly. So, this is one such example where you will end up making a big mistake and that will not cause only the time is consumed but also many investments and it is also going to affect many other parameters and you may require to have major corrections in the design implementations. So, the planning and execution of a technical project are very important parts.
So, if these two steps are going to not fall in place, if they are going to be incorrect, then the entire project is going to suffer and you will not get final outcome as per your expectations. So, realization or implementation or execution must be well planned. Right. So, for any technical project or any engineering project, the planning is very much essential. Without planning, you cannot actually go to the next step which is realization or implementation or execution. So, if you take up any other project of related to electrical engineering, let's say if it is a case of substation design.
Right. So, in case of setting up a substation for electrical power, you need to decide about the location, about the voltage level, about how much power you are going to feed into what lines and what exactly are the fundamental requirements. So, those planning is done, then the next step is going to be the execution. So, any technical project, the first phase is very, very important. So, what is exactly this planning? What are the parameters or what exactly are the steps in the planning? Right. So, let's discuss more about what the meaning of planning is.
So, planning is actually the estimation and creating a model of the system. So, here comes an important term, a model. So, what is the model of a system? So, model of a system is nothing but the mathematical representation of subsystems as well as main system. And it is expected to behave same as the actual system. So, for example, an electrical system model, we can take, let's say there is a transformer in the substation. So, this transformer in a substation is going to have some input power and output power.
So, what this transformer is going to basically do, that can be implemented by a model which is going to represent the behavior of the entire system. We can take up any other simple example related to mechanical engineering. Let's say this block represents a simple gearbox. So, whatever is the input speed and torque, the output speed and torque will be divided by some ratio and that is called a gear ratio. So, how do we mathematically represent the gear ratio? So, gear ratio can be a simple number and which you can assign in a block.
So, the model of a system is nothing but a representation or mathematical equation representation of that particular system of interest. So, the next important term which we are going to learn is what is a simulation? Once you have the model ready, right? So, once you have let's say made a gearbox model. So, a gearbox model in a most simple term can be written like a constant number which is a gear ratio. Let's say there is a input torque and speed over here. Let's say T torque and the omega speed which is on the input side and they are denoted as torque T1 and omega 1.
On the output side or let's say the driven shaft. This is an input side or driving shaft. This is a driven shaft and on this shaft we have torque T2 available and speed omega 2. And this gear ratio or this block is going to just represent a constant number X in an ideal condition. So, now if you have built this model, now you try to create a real life situation. What is a real life situation? Where you decide about some T1 and omega 1 values and you check out what is a T2 and omega 2 value.
Well, if it's just a ratio, this values will be either multiplied or divided. But if you want to add some other inputs, let's say it's a variable gear or you want to also incorporate the amount of losses happening in a gear. Or let's say you want to add some non-linearities to the gear, right? So, how you can do that? So, for that you need to create a detailed mathematical model, right? So, what are the real life situations? So, for example, a civil engineer created a model of a bridge, right?
And this bridge model is to be tested for earthquake situation, right? Let's say... Let's say... This understanding of behavior with the effect of earthquake is going to be called a simulation, right? So, when you provide the predefined inputs to a model and you analyze the output, that situation is or that process is called making out a simulation. So, when you were a child, you must have played a car racing game or maybe any other different game. Now, actually, what is this game? Now, this game is a virtual environment where you believe that you are inside a car and you are driving and you are visualizing the road conditions and visualizing the other cars and other systems which are coming up in the road environment.
So, actually, the programmer who created this game has made a model of running a car in a typical situation. So, a car racing game is nothing but a model given to you to play with, right? So, now, you can have the direction-related inputs, the acceleration and braking-related inputs and many other configurations. So, effectively, a car racing game is nothing but a mathematical model given to you to play with, to run a simulation of. So, while you are playing a car racing game, you are actually doing a simulation.
So, a simulation is nothing but a virtual environment. So, virtual environment represents how virtually the things will happen. So, simulation is not reality, but it is a fictitious arrangement or fictitious setup of a system where you make the use of a mathematical model and try to understand how it behaves. So, another important term after the model is a simulation. So, simulation is a virtual environment where you run your model, right? So, what is the meaning of running your model is execute, right? So, you provide some inputs to the model and you focus on what are the outputs.
In this example, T2 and omega 2. So, when you run your model, it is going to be created as a fictitious situation, right? So, if I give you a better idea about, let's say, how exactly a simulation will look like, right? A better example is a pilot simulator or we can say that a flight simulating environment, right? So, how does a pilot is going to learn how to fly an aircraft? So, before driving an actual aircraft, it is very, very important to train the pilot for different situations.
And this is kind of an aircraft simulator for a pilot where they will learn how all the control and commands or how all the inputs are working and what kind of behavior we are getting in the aircraft and how is the visualization as well, right? So, here what you see is the actual inputs and these are physical inputs. You might have seen a driving car simulator like this, right? And this is nothing but a screen where the driver is going to experience the external environment, right?
So, once these inputs are fictitiously provided in this simulation setup, the aircraft is going to behave accordingly and this view will also get affected. So, there may be some alarm indication, there may be some other communication related things, but overall, this simulation is going to help pilot learn about how to fly an aircraft, right? So, this is going to be the very, very important phase for a pilot before driving an actual aircraft, right? So, how you come up with a learning? So, learning is going to be the basic outcome of a simulation, right?
So, here a pilot learns how to run an aircraft. If you have a proper mathematical model, something like this, you will also learn how a system behaves and what kind of input will learn. Result in which kind of output. So, this is all about the basic understanding of simulation. So, here let's understand what is a block diagram approach. So, once you have understood the model and the simulation, now we need to understand what is the block diagram. So, block diagram is nothing but how you create your model mathematically.
So, block diagram is actual representation of your system in a block diagram way, right? So, logical operations, right? Or any other equations, right? Are converted into blocks. So, let me give you a very basic example where let's say we have two variables A and B, right? These are the two inputs available and our process is going to add these two inputs and finally, the result is going to be stored in another variable called sum, right? So, if I write an equation where sum equals to A plus B, where A and B are the inputs and sum is the output, this very simple equation can be represented in a block diagram as well.
So, how do we make a block diagram? So, let's say these two are actually the inputs. The plus is an operator where we need to do that operation and finally, we need to assign whatever is a result of this process to a variable name as sum. Now, how do you do it classically? If you have learned MATLAB scripting, you will be writing a very simple script that sum equals to A plus B provided A and B are declared. Now, how do you perform the same task in a block diagram way?
Let's see that. So, if you have not learned about MATLAB scripting, if you are familiar with, let's say, simple C program, your simple C program will be looking like this, right? So, you declare two variables, for example, X and Y in this case. So, X and Y are declared and the sum is going to be the result variable. Now, you may ask for the user input that you enter two values of X and Y. Now, once the user has given two values, you are going to make sum of two inputs and that is going to be stored in a variable sum.
And in the printf command or print to the file command, you say that sum is this value, right? So, whatever is this sum is referred over here and it will be taking this place. So, in this simple C program, how can we convert this into a block diagram, right? So, instead of writing a text or instead of following a syntax, can't we represent or can't we just focus on what is the process to be done? Instead of how to take the input, how to print the output, if we just focus on what is to be done with the inputs, it will be much easier, right?
And therefore, the block diagram approach is actually a very simple representation of a complex system, right? So, here we are taking just two variables. It may be any complex situation or a system or maybe any complex equation. So, if I convert this C program or maybe a MATLAB script of adding two variables into a block diagram, a simuling block diagram will look like this, right? So, for example, here we have the two input blocks and they are declared as a constant and their values are, let's say, 23 and 45.
They are predefined and we have a block called ADD, which is going to accept these two inputs and whatever is the output that is available at this port and that is given to a display port like this, right? So, this is one simple translation of the equation into a block diagram way. So, this is a block diagram approach. Now, how this block diagram works or what are the things related to this? How do we run this block diagram? How we can change all these values? Can we have a third input as well, right?
Or instead of this, if you can vary all these parameters while the simulation is running and instead of a display of a constant number, can we have a graph available? Yes, everything is possible in a simulink environment. So, this is just a basic example to start with. In fact, simulink has all the powerful mathematical tools such as minimum and maximum or real imaginary number system to complex number system as well. And there are so many other similar basic mathematical functions. So, instead of. Just adding a number, if you want to find out what is a minimum and maximum value in an array, right?
So, now this is a constant, we can declare an array or let's say a group of numbers and they are assigned some value, right? So, let's say here you have some array representing the temperature data from a temperature sensor and you want to find out how much was the maximum value in a typical duration of time. So, let's say you run your simulation for 10 seconds and you try to figure out in the 10 seconds with the all previously inputted values, which one is the maximum value and let's say in 10 seconds, you are going to input 1000 number of temperature value data or temperature samples.
So, when this 1000 number of temperature samples are given to this block, this block is basically going to find out which value out of this 1000 value, which value is the maximum value or similarly, you can find out the minimum value as well. So, this minimum and maximum block, instead of writing a script, which may be a tedious task or which may be time consuming if you are not a programmer, then it's very simple to add just a minimum maximum block and that block is going to be nothing but maybe your 5 or 5 to 7 line of codes, right?
So, this is how modeling in Simulink works and this is how the block diagram approach is deployed for MATLAB and Simulink. So, once you have figured out what is to be done, right? You can actually do many more things, right? So, what is the difference between the programming language and a block diagram language? So, here in case of a programming language, if you are not a good programmer, what you will be doing ending up or what you will be spending most of your time in the syntax, right?
So, probably if you are new to C program, you will be learning about how to create variables, how to declare them, how to ask the user for input, how you can do the assignment and addition operator, those are mathematical operations, how for let's say this using of scanf and printf, you may require to include some header files over here. So, how the scanf and printf are defined and how exactly if I do not write some typical syntax like %d over here, then there will be some errors, right?
So, instead of focusing on writing a program and following the syntax, you can just focus on what is to be done with the inputs, right? So, this is how the block diagram way is going to simplify your calculations or simplify your complex systems. Now, let us learn about model-based design for engineering systems. So, what are the model-based design of an actual engineering system? So, mathematical models are most suitable for initial experiments, right? So, for example, a mechanical engineer has decided to actually make a gearbox, right?
So, you are going to make a gearbox and you have an input shaft and you have an output shaft coming out of this gearbox. Now, before you actually go and manufacture or maybe you take some help of the technician or the person who is going to make you this gearbox available or maybe they may be making one prototype for you, it's very important to do some initial experiments without the actual gearbox, right? So, mathematical model is going to help you or it is going to be most suitable for very fundamental or initial experiments.
So, what you are going to do is basically you will be trying your concept, right? You will be actually doing your proof of concept kind of thing or you will try to understand what will be the loading arrangement. Let us say what are the values of the speed and or what can be the size of this gearbox, what can be the type, right? So, you may be interested in deciding the size or maybe deciding the type or maybe what is going to be the overall efficiency, right?
So, for this, you must start with a basic mathematical model. So, sometimes the actual system realization may be costly and time consuming, right? So, you may do various number of experiments with different size and different type, but you may not actually manufacture all of your concept, right? So, once you have a very full proof concept or very well tested concept in a modeling and simulation environment, then only you will go for realization or you will go for making one, right? So, the actual system realization may be costly and time consuming, right?
And some experiments are always better to be done in a simulation mode, right? So, for example, a vehicle crash test, right? So, vehicle crash test is one such example where you will always like to be avoided, right? It's always better to be done in a computer system, right? Because it may be costly, it may be time consuming and it may result into the physical damage, right? So, you would like to avoid any physical damage, any usage of the energy. You may not want to take any risk, right?
It may be risk, financial risk or it may be the safety related risk, right? So, for example, one electrical engineer is required to do a short circuit test, right? He wants to, let's say, test a circuit breaker or let's say a protection device device and he wants to try that whether this protection device will work on a short circuit or not. So, actually, he can implement this in a model-based system design and he can visualize the results in how much time the faulty part of the circuit is isolated and what is going to happen if the fault is going to be persistent or if the fault condition is not recovered.
So, model-based design is going to help engineers do all these things which are actually not possible physically, right? So, there are many advantages of doing such analysis or doing such initial experiments within your computer. So, this is the advantage of model-based engineering system design and actually, the model-based design can be interdisciplinary, right? So, for example, you want to analyze this gearbox for a DC motor, right? So, here, a DC motor is this block which is going to drive this shaft and there is a gearbox and there is some mechanical load connected over here, right?
So, you want to analyze what happens to the motor as well as the gearbox once some kind of load is applied on the shaft. So, you can run a simulation which involves both the dynamics of a DC motor as well as the gearbox. So, these are the advantages of model-based design. Let's go further and understand more about fundamental elements and using the mathematical model of basic blocks of electrical and mechanical system.