Perturbation analysis of bistability and period doubling bifurcations in directly-modulated laser diodes