Boundary layer state detection using piezoelectric sensors