





































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






































Class: 1 Date : 25/06/ Topic: Fundamental concepts of MATLAB/Simulink Software Required: MATLAB R2018a or Equivalent.
The word ‘ Simulink ’ is derived from the word Simulation and Link which is available in the form of a toolbox and is an integral part of MATLAB. It is linked with the MATLAB for modeling, simulation and analysis of a dynamic system in block diagram form. In this chapter, we will learn about the basic features of Simulink from getting started to creating, running and analyzing a dynamic model of a system and linking of .m file with. mdl/.slx file.
Simulation in a system involves the following steps: Observing the physical system. Formulating a mathematical model. Predicting the behavior of a system. Testing the validity of the model.
Mathematical models can be classified in many ways. Those are categorized as below:
For developing a model, we can follow these steps: Identifying the purpose of the model and its constraints.
Figure- 2. From the command window. After starting Simulink by choosing any of options, blank model option will pop up. By clicking it, we will get a new page for Simulink where we mainly draw any model for simulation or any kind of math operations. Figure- 3. Option for Blank Model. New Model
Figure- 4. Simulink page. In the Simulink page, we can see the ‘ Library Browser option’ where different kinds of blocks are available. Continuous, Discontinuous, Discrete, Math operations, Sinks, Sources, Commonly Used Blocks etc. blocks are seen. From these blocks, we can use the elements to draw a model or solve a problem. Library
Continuous Derivative Numerical derivative of input signal Integrator Continuous time integrator of input signal Transfer Function Transfer function of a system Transport Delay Apply specified delay to the input signal Discontinuities Dead Zone Output zero for inputs within the dead zone specified Relay Output the specified ‘on’ or ‘off’ value by comparing the input to the specified thresholds Saturation Limit input signal to the upper and lower saturation values Discrete Difference Output the current input value minus the previous input value Discrete Derivative Discrete time derivative of the input Memory Apply one integration step delay Unit Delay Sample and hold with the one sample period delay Math Operations Abs Output absolute value of input Add Add or subtract inputs (maybe more than two) Divide Multiply or divide inputs Gain Element wise gain or matrix gain of input signal Trigonometric Function Trigonometric and hyperbolic functions Sinks Display Numeric display of input value Scope Display signals during simulation To File Write data to a file To Workspace Write data to workspace in matrix form
Sources Clock Display system time Constant Inject a constant value as input From File Read data from a given file From Workspace Read data from a matrix in workspace Pulse Generator Generate Time-based or Sample-based pulses Repeating Sequence Repeat an arbitrary signal Signal Generator Generate various waveform such as sin, square, sawtooth etc. Sine Wave Sine wave generator Step Generate a step function
Once Simulink browser window is opened, the user can create a new model or open an existing model. By clicking on the new model icon from the toolbar of Simulink Library browser, a new model can be created using different elements from the box.
By clicking on the Open Model icon from the toolbar of Simulink Library Browser. By selecting Open option from the File menu of Simulink Library Browser. By pressing Ctrl+O keys at the active Simulink Library Browser. A new Open dialog box will appear on the screen. The desired model file can be opened by selecting its location.
The various steps involved to create a Simulink Model are as follows:
Step-2: Open “Commonly Used Blocks” and select “Scope” Step-3: Set parameters of sine wave
Step-4: Connect sine wave with scope and run this simulation at 0.06s simulation time Step-5: Click on scope to see the desired waveform
Step- 3 : Open “Math Operations” and select “Trigonometric Function”. Step-4: Change parameter to get cosine function
Step-5: Open “Commonly Used Blocks” and select “Product” block Step- 6 : Select “Digital Clock”
Step- 9 : Click on the “scope” to see waveforms of sine and cosine Sine Wave Cosine Wave
Addition, Subtraction, Multiplication and Division operations. Step-1: Open “Sources” from Simulink library and select “Sine Wave” Step- 2 : Open “Math Operations” and select “Add” block
Step- 5 : Set parameters of sine waves
Step- 6 : Connect all the blocks and run the simulation