Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create a Simscape Power Systems model.
Simulink
model = simscape.[1]('PowerSystemModel');
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using plural form 'PowerSystems' instead of 'PowerSystem'.
Confusing with 'ElectricalSystem' which is not a Simscape function.
✗ Incorrect
The correct function to create a Simscape Power Systems model is simscape.PowerSystem.
2fill in blank
mediumComplete the code to add a voltage source block to the model.
Simulink
voltageSource = addBlock(model, '[1]');
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'CurrentSource' instead of 'VoltageSource'.
Selecting passive components like 'Resistor' or 'Capacitor'.
✗ Incorrect
The voltage source block is named VoltageSource in Simscape Power Systems.
3fill in blank
hardFix the error in the code to connect two blocks in the model.
Simulink
connect([1], [2]);
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using commas without specifying ports.
Not using dot notation for block ports.
✗ Incorrect
Blocks are connected by specifying their ports, such as voltageSource.load and load.
4fill in blank
hardFill both blanks to create a load with resistance and connect it to the voltage source.
Simulink
load = addBlock(model, '[1]'); connect(voltageSource.[2], load);
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Capacitor' instead of 'Resistor' for the load.
Using incorrect port names like 'loadPort'.
✗ Incorrect
The load is a Resistor block, and the voltage source port to connect is load.
5fill in blank
hardFill all three blanks to simulate the model and plot the voltage over time.
Simulink
simResult = simulate([1]); voltageData = simResult.[2]; plot(voltageData.[3], voltageData.values);
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Current' instead of 'Voltage' for the signal.
Plotting against 'values' instead of 'time'.
✗ Incorrect
We simulate the model, get the Voltage data, and plot it against time.