# Subsystem based Simulation

Each component (inverter, generator, motor, etc.) should be in its own file, and then they are all brought together in `main.slx`.

see the mathworks help for how to do this: https://www.mathworks.com/help/simulink/ug/create-and-use-referenced-subsystems-in-models-using-subsystem-reference.html



I have made all 3 subsystems like this so you should be able to just open main, and will have access to the other 3 files by double clicking into them like normal (assuming all files are in the same directory).

Note: the motor and generator are currently in per unit, so that might be a problem until we change that (or set the inverter to per unit).

Edits: if you only work on one subsystem, please overwrite that file. Git has backups built-in (see commit history) in case we need to go back to an earlier revision.

