Posts

Showing posts from April, 2021

Simscape Library | HIL testing Simulation in Simulink | Simscape blocks and their application in Simulink | MATLAB/Simulink based simulated HIL testing

Image
   Source: MathWorks Website  Simscape Blocks Libraries According to MATLAB/Simulink documentation, the Simscape contains all those blocks that have some physical parameters that exist in real life for dynamic modelling of systems. For example we have electrical elements like transformer, diode, MOSFETs, whose transfer functions or state space modelling is not always possible. For that purpose Simulink provide a library with such blocks to model. It is generally divided into 5 main parts comprising of Electrical and Mechanical basic bodies of simulation. They are:  Electrical  Fluids  Driveline  Multibody  Utilities  Foundation Library These are further divided into many more categories but majority of the simulation verification of physical environment can be done by Foundation Library . This is again divided into the categories given in below image. Examples of some basic physical system 1. Spring Mass Damper System Let's have a spring m...

PID Controller in MATLAB/Simulink using Transfer Function approach | PID Controller in MATLAB | How to simulate PID Controller in Simulink

Image
Source: MathWorks Source: MathWorks   REVISION In previous blog, we saw what is control system , what is  PID controller and it's basic explanation. I really hope you all are familiar with all these concepts and now we can further go to MATLAB/Simulink application of this controller. Steps to Simulation It has always been observed that with low RAM or after internet connection, the MATLAB/Simulink become slow in functioning. The Simulink takes time to open, so using command line to open Simulink would be better. Command Line text for MATLAB Follow the steps after opening the blank Simulink Model now add the following blocks: 1. Transfer fcn 2.  Add block 3. Step 4.  PID block Now connect all this in given formation in this image Now open the transfer function block and configure it like this In this, the array of the numerator coefficients of  s², s and constant, must be written and same as for denominator as highlighted . Now open the PID controller block a...