The design of in-fiber Bragg grating systems for cubic and quadratic dispersion compensation