Simulink Onramp Progress after this session Modules 1–6 of 11  (55%)
📋

Session Overview

Session 06 deepens your Simulink practice. You can now place and connect blocks — this session teaches you to read what your model is telling you (Scope), understand what every parameter means physically, and control how long a simulation runs.

The central build today is the RPM-to-rad/s Gain model — a real motor controller conversion you will extend into a subsystem in Session 07.

🧠
Block A — 15–20 min
Theory: block parameters in depth, Scope as oscilloscope, stop time & solver intro
🖱️
Blocks B & C — 90 min
Onramp Modules 4–6: parameters, Scope, stop time, RPM→rad/s model build
Block D — 15 min
EV task: build RPM→rad/s Gain model, verify output, Scope inspection
Objective
After this session you can set block parameters that map to real EV hardware specs, read amplitude/transient/steady-state from a Scope, change simulation stop time, and build the RPM→rad/s conversion model from memory.
🔁

Recap from Session 05

What is the difference between a block and a signal?
Block = function. Signal = time-varying value on a wire.
Which Library is the Gain block in?
Math Operations
What does a Scope show for a Constant block input?
A flat horizontal line — correct, not an error.
What must you do after changing a block parameter?
Press ▶ Run again. Simulink does not auto-update.
⚙️

Block Parameters — Deep Dive

Every block parameter is a real engineering value. It should be traceable to a datasheet or engineering standard.

BlockParameterReal EV equivalentExample
GainGain valueRPM → rad/s unit conversion0.1047 (= 2π/60)
GainGain valueMotor torque constant Kt (N·m/A)0.85
Sine WaveAmplitudePeak AC phase voltage325 V (= 230 × √2)
Sine WaveFrequencyInverter output frequency50 Hz
ConstantValueFixed motor speed operating point300 RPM
Stop TimeSimulation timeDrive cycle duration1800 s (full WLTP)
Engineering Link
Changing the Gain block value from 0.1047 to 0.85 is not just editing a number — you are swapping one physical relationship for another. The first converts speed units. The second scales current to torque. Always know which real equation each Gain represents.
📊

Scope Block — Your Digital Oscilloscope

The Scope shows the complete time history of a signal — exactly what a hardware oscilloscope shows on a test bench.

Diagram — what to read on a Scope output
flowchart TD S["Scope Output (signal vs time)"]:::root S --> A["Amplitude peak y-axis value e.g. max motor torque"]:::sig S --> B["Steady State signal stops changing controller has settled"]:::green S --> C["Transient initial spike/dip e.g. inrush current"]:::cyan S --> D["Flat Line constant input correct — not an error"]:::orange classDef root fill:#ECFDF5,stroke:#475569,color:#1E293B,font-weight:bold classDef sig fill:#D1FAE5,stroke:#059669,color:#065F46,font-weight:bold classDef green fill:#E0F2FE,stroke:#0284C7,color:#0369A1,font-weight:bold classDef cyan fill:#EEF2FF,stroke:#475569,color:#1E293B,font-weight:bold classDef orange fill:#FEF3C7,stroke:#D97706,color:#92400E,font-weight:bold
Flat Line
A flat horizontal line on the Scope for a Constant block input is correct. A constant input produces a constant output. The Scope is not broken.
Industry Link
A Scope on a motor torque signal shows exactly what an engineer sees on a dynamometer display during physical testing — same shape, same axes, same question: does it match the spec?

Stop Time & Solver Settings

Stop Time controls how long the simulation runs. It is one of the most commonly changed parameters.

Short stop time (e.g. 10 s)

Good for checking model behaviour at one operating point. Use for today's exercises.

Long stop time (e.g. 1800 s)

Needed for full drive cycle simulation. WLTP = 1800 s, urban phase only = 589 s.

Solver
Leave the solver set to Variable-step ode45 (Simulink default). This is suitable for all exercises in this session. Solver settings become important in Simscape and control design courses.
✖️

The Gain Block — Core of Today's Build

Diagram — RPM to rad/s conversion model
flowchart LR A["Constant value = 300 (motor RPM)"]:::input --> B["Gain × 0.1047 (= 2π/60)"]:::gain --> C["Display ≈ 31.4 (rad/s)"]:::output classDef input fill:#ECFDF5,stroke:#475569,color:#1E293B,font-weight:bold classDef gain fill:#D1FAE5,stroke:#059669,color:#065F46,font-weight:bold classDef output fill:#EEF2FF,stroke:#475569,color:#1E293B,font-weight:bold
% Verification — what the model computes RPM = 300; gain = 2*pi/60; % = 0.1047 rads = RPM * gain; % = 31.4159 rad/s
Why rad/s?
All equations of rotating machinery — torque, angular momentum, power — use radians per second. Motor controllers operate in rad/s internally. RPM is a human display unit only. This conversion is present in every real motor controller implementation.

EV Context

Session 06 model in EV terms

Build: Constant (300 RPM)Gain (0.1047)Display

This represents: motor spinning at 300 RPMunit conversion to angular velocity31.4 rad/s output to motor controller

In Session 07 you wrap the Gain block into a reusable subsystem called RPM_to_RadPerSec. The model structure stays the same — only the organisation changes.

Industry Link
The Porsche Taycan uses an 800 V architecture. At the same 150 kW output, current = 150,000 ÷ 800 = 187.5 A — half the current of a 400 V system. This is why high-voltage platforms use thinner cables. The same logic applies to every Gain block in a powertrain model: the parameter IS the engineering relationship.
🔧

Block D — EV Task

Block D ⏱ 15 min RPM-to-rad/s Gain Model
1
Build the model

In Onramp: Constant (300) → Gain (0.1047) → Display. Add a Scope in parallel with the Display. Run. Verify Display ≈ 31.4. Open Scope — what shape do you see and why?

2
Change the stop time

Change Stop Time from 10 to 100. Re-run. How does the Scope output change? Now change it to 1800. What does 1800 s represent in a real drive cycle context?

3
Change the motor speed

Change the Constant block value to 600. Re-run. What does the Display show now? Verify your answer: 600 × 0.1047 = ?

4
Group discussion
Q1 — What Gain value would convert rad/s back to RPM? Calculate it before checking in Onramp.
It is the inverse of 0.1047 — compute 60/(2π)
Q2 — If you change Stop Time from 10 to 10,000, the Scope x-axis stretches. Does the model output change? Why?
Think about whether a Constant block input depends on simulation time
Q3 — What real EV component must output a signal in rad/s rather than RPM?
Think about what receives the speed signal — the motor controller firmware
🛠️

Troubleshooting

❌ Display shows 0.3140 instead of 31.4
Fix: Gain is set to 0.001047 not 0.1047, or Constant is 3 not 300. Double-click each block and check values.
⚠️ Changed parameter but Scope/Display shows old result
Fix: Must press ▶ Run again after every change. Simulink does not auto-update.
⚠️ Gain block shows "??" on canvas
Fix: Gain parameter is empty. Double-click Gain block, type 0.1047, click OK.
⚠️ Scope shows same flat line even after changing to Sine Wave
Fix: Simulation was not re-run. Press ▶ Run. Also verify the Sine Wave output port is connected to the Gain input.

Key Takeaways

⚙️Every block parameter is a real engineering value — traceable to a hardware datasheet or physical formula.
📊The Scope block is a digital oscilloscope — read amplitude, transient, and steady state from it.
📉A flat Scope line for a Constant input is correct — not an error.
Stop Time sets simulation duration. 1800 s = full WLTP cycle. Change it to match the scenario you are modelling.
✖️The Gain block scales a signal by a constant. The value IS the physical conversion factor — 0.1047 = 2π/60 = RPM to rad/s.

Before Session 07

You now have a working RPM→rad/s conversion model. If a full BEV powertrain model contained 10 motors, you would need 10 identical Gain blocks. There has to be a better way to organise this.

Session 07 introduces subsystems — the mechanism for grouping, naming, and reusing blocks. The RPM→rad/s Gain becomes a single named subsystem block.

Session 07 →