Knowledge Base
Welcome to OPAL-RT’s Knowledge Base
OPAL-RT offers a repository of support information for optimal use of its technology.
Please note that OPAL-RT knowledge base is not fully optimized for mobile platforms.
For optimal experience, use a desktop computer.
Reference Number: AA-02019// Views: AA-02019// Created: 2021-06-01 18:40:39// Last Updated: 2021-06-07 09:35:59 HowTo How to calculate the number of states of Simulink model A state-space model is commonly used for
representing a linear time-invariant (LTI) system. It describes a system with a
set of first-order differential or difference equations using inputs, outputs,
and state variables. SimPowersSystems (SPS) is State-Space based solver for
electrical circuits. But how to
calculate the number of states of a model ?
The command The number of states can be calculated as follows: 1. Open the simulink model (if the model contains Artemis block, you must remove or comment it), 2. Be sure that the model runs offline, 3. Go to Matlab and type the command : <SPS=power_analyze ('xxx', 'detailed')>; xxx is the name of the model (as shown below), 4. Some warnings may appear but you can ignore them, 5. Type the command :
1. Open the simulink model 2. Double click on the PowerGui block > "Preferences" 3. Activate the option "Display Simscape Power Systems ST compilation messages" (as shown below) 4. Run the model offline and go to "Diagnostic Viewer". The total number of states will be displayed as shown below. |