create subsystems using functions in conitnuous_pwa example

because it emphasizes the problem's structure