Student Notes · 2 Hours · Simulink Onramp Modules 1–3
This session introduces Simulink — MathWorks' graphical block-diagram environment for modelling and simulating dynamic systems. You will work inside Simulink Onramp, a browser-based sandbox requiring no local installation.
By the end you will navigate the Simulink interface, understand what blocks and signals are, find blocks in the Library Browser, connect them to form a signal chain, and run your first simulation — all framed in EV engineering context.
You have already used MATLAB. Simulink solves a fundamentally different kind of problem. Understanding the distinction is the most important conceptual step in this session.
| Property | MATLAB | Simulink |
|---|---|---|
| Paradigm | Script-driven — write code line by line | Graphical block diagram — connect blocks visually |
| Core unit | Variable — a static value at one moment | Signal — a value that changes over simulation time |
| Execution | Sequential: line 1, line 2, line 3… | Continuous simulation driven by a solver |
| Best for | Data processing, matrix math, analysis | Dynamic systems, control loops, time simulation |
| EV example | current = (150*1000)/400 | Throttle block → Controller block → Motor block |
x = 5 stores the number 5. In Simulink there is no x = 5. Instead you place a Constant block with value 5 and draw a wire carrying that value to the next block. The wire is the signal — it exists over simulation time, not just at a single moment.When you open Simulink Onramp you see four key areas. Spend two minutes locating each one before starting the exercises.
Catalogue of all available blocks organised into categories. Use the search bar at the top — it is faster than browsing folders. Drag a block from here to the canvas to add it to your model.
The grid where you build your model. Drag blocks here then draw signal lines between them by clicking an output port and dragging to an input port.
Opens when you double-click a Scope block after running. Plots signal value (y-axis) vs simulation time (x-axis). Your digital oscilloscope.
Contains ▶ Run (Ctrl+T) and the Stop Time field. Stop Time sets how long the simulation runs in seconds. Default 10 — leave it for today.
Every Simulink model is built from two things: blocks (functions) and signals (connections).
A block is a function. Every block has configurable parameters (e.g. the Constant value, the Sine Wave frequency). Double-click any block to open its parameter dialog.
A signal is a value that changes over simulation time — it travels along the wire between blocks. A signal has a complete time history; a MATLAB variable is a static snapshot.
Find each block using the Library Browser search bar before starting Module 2. You need five blocks today.
| Block | Library | What it does | EV application |
|---|---|---|---|
| Constant | Sources | Outputs a fixed value — does not change during simulation | Fixed throttle position; motor speed at steady state |
| Sine Wave | Sources | Outputs a sinusoidal signal (amplitude, frequency, phase) | AC motor phase voltage; current ripple from inverter |
| Scope | Sinks | Plots signal value over simulation time — your oscilloscope | Viewing motor torque output or voltage waveform over time |
| Display | Sinks | Shows the current (final) value of a signal as a number | Reading final SoC value or motor speed at end of cycle |
| Gain | Math Operations | Multiplies input signal by a constant value | RPM → rad/s conversion; scaling throttle to torque command |
Search for each block name. Drag it from the results panel onto the model canvas. Position it to leave room for wires on left and right.
Hover over the output port (right side of a block, triangle ▷). Click and drag to the input port (left side, square □) of the next block. A solid dark line = correct. Orange/dashed = error.
Double-click any block to open its parameter dialog. Change values, click OK. Every parameter is a real engineering value — know what you are setting.
Press Ctrl+T or click the Run button in the toolbar. After running, double-click the Scope block to see the output waveform. Must re-run after every parameter change — Simulink does not auto-update.
Every stage of an EV powertrain is a signal transformation. Each transformation is a block. Each connection is a wire.
Build: Constant (300) → Display
This represents: motor running at 300 RPM → display confirms signal received. In Session 06 you add the Gain block that converts this to rad/s and links it to real motor physics.
Draw four boxes connected by arrows: Throttle Input → Motor Controller → Electric Motor → Wheel Speed. Label each arrow with the signal type (throttle %, torque command N·m, angular velocity rad/s).
For each stage in your sketch, identify the block from the Library Browser. Write the block name next to each box. Which block represents a fixed throttle? Which would plot wheel speed over time?
Build Constant (300) → Display. Run it. Verify Display shows 300. Then add a Scope in parallel with Display (connect Constant output to both). Run again — what does the Scope show for a Constant input?
You built a Constant → Display model. You can see the value but not how it relates to real motor physics. The Gain block changes that — it scales the signal and links it to a physical conversion.
Session 06 adds the Gain block, introduces block parameters in depth, and builds the RPM→rad/s conversion model.