Consider a Shimura variety defined over some number field, and assume we have a model over the ring of integers at some prime of bad reduction. It is then interesting to know the alternating trace of Frobenius on the invariants under the inertia group of the sheaf of nearby cycles, since these traces are related to the local factor of the Hasse–Weil zeta function. In this article we compute the semi-simple alternating trace of Frobenius for Shimura varieties associated to the groups GU(2,2) and GU(3,2), with level structure of Iwahori type, by investigating the equations of the local model defined by Rapoport and Zink and by performing explicit blowing ups.