``Simplify`PWToUnitStep``: f[z_] := Piecewise[{{0, 0 < z < 30}, {1, 30 < z < 60}, {0, 60 < z < 120}, {-1, 120 < z < 150}}] Simplify`PWToUnitStep@f[z] >-(1 - UnitStep[120 - z]) (1 - UnitStep[-150 + z]) + (1 - UnitStep[30 - z]) (1 - UnitStep[-60 + z])