In this paper, we consider the optimal input design problem for active model discrimination (AMD) among a set of switched nonlinear models that are constrained by metric/signal temporal logic specifications and affected by uncontrolled inputs and noise. To deal with nonlinear and non-convex constraints in the resulting bilevel optimization problem, we first over-approximate the nonlinear dynamics using piecewise affine abstractions. Then, we solve the relaxed inner problem of the bilevel AMD problem as parametric optimization problems and substitute the parametric solutions into the outer problem to obtain sufficient separating inputs for AMD. Moreover, since the parametric optimization problems are often computationally demanding, we propose several strategies to reduce the computational time, while preserving feasibility of the separating inputs for AMD. Finally, we demonstrate the effectiveness of our approach on several illustrative examples on fault detection and lane changing scenario.