Simulink Lesson 6
Simulink Lesson 6
BECE4/BEEE4/BEEE4E/BETE4/BAE5
Lesson 6: MODELLING WITH SIMULINK
S. Mafumbi, Staff Associate, Electrical Engineering. Dept
LAST LESSON
In lesson 5, we discussed numerical methods with C++
Any questions??
INTENDED LESSON OUTCOMES
In this lesson, we will discuss the modelling of dynamic
systems using SIMULINK
By the end of this lesson, the student should be able to:
o Model dynamic systems using SIMULINK software; and
o Create subsystems in complex systems modelling.
REFERENCE MATERIALS
• Choose Create Subsystem from the Edit menu. Simulink replaces the
selected blocks with a Subsystem block as shown below:
CREATING SUBSYSTEMS
Method 2
• Double-clicking the subsystem reveals the following
End of Session
Next Time
Selected Simulink blocks and Simulink tutorial
SELECTED SIMULINK BLOCKS
1. The Fcn – f(u) Block
This is a general expression block used to apply a specified
expression to the input.
The expression must be mathematically well formed (i.e., matched
parentheses, proper number of function arguments, etc.).
Double click the block to change the expression as required.
SELECTED SIMULINK BLOCKS
2. The Math Function Block
Used to perform a mathematical function.
The Math Function block performs numerous common mathematical
functions.
You can select one of these functions from the Function list:
exp, log, 10u, log10,magnitude^2, square, sqrt, pow, reciprocal, mod,
transpose, and many others.
The block output is the result of the function operating on
the input or inputs.
SELECTED SIMULINK BLOCKS
3. The Zero Order Hold Block
The Zero-Order Hold block implements a sample-and-hold
function operating at the specified sampling rate.
The block accepts one input and generates one output,
both of which can be scalar or vector.
This block provides a mechanism for discretizing one or
more signals or resampling the signal at a different rate.
SELECTED SIMULINK BLOCKS
4. The Switch Block - Switch between two inputs.
The Switch block propagates one of two inputs to its output
depending on the value of a second input, called the control input.
If the signal on the control input is greater than or equal to the
Threshold parameter, the block propagates the first input;
otherwise, it propagates the third input. The figure below shows
the use of the block.
SELECTED SIMULINK BLOCKS
A Switch block accepts real- or complex-valued signals of any data
type as switched inputs (inputs 1 and 3). Both switched inputs must
be of the same type. The block output signal has the data type of the
selected input. The data type of the threshold input must be Boolean
or double.
SIMULINK AND DIGITAL ELECTRONICS
Though not the best tool for simulating digital electronics
circuits, SIMULINK offers the electronics engineer a chance to
simulate their digital circuits.
Simulink has all logical operators(AND OR NOT etc) blocks
including JK flip-flop, D-flip-flop and the D-latch. Find these
under ‘Simulink Extras’ in the browser
SIMULINK AND DIGITAL ELECTRONICS
SIMULINK TUTORIAL
Tutorial 1 in word format
Simulink Tutorial 1
‘DC motor speed modeling with SIMULINK’
Simulation:
To simulate the model, add scope and step function blocks. In addition,
enter the following values for the physical parameters on the Model
(on the MATLAB command window)
J= 3.228E-6, b=3.5077E-6, k=0.0274, R=4, and
L=2.75E-6.
LESSON SUMMARY
In this lesson, we have:
o Modelled dynamic systems using SIMULINK software; and
o Created subsystems in complex systems modelling.
Any questions??
NEXT LESSON
In the next lesson, we shall have an assessment covering
numerical methods with MATLAB and C++, and modelling with
SIMULINK.
End of Lesson
THANK YOU