  Monitoring is an important body of techniques in runtime verification of
real-time, embedded, and cyber-physical systems. Mathematically, the monitoring
problem can be formalized as a pattern matching problem against a pattern
automaton. Motivated by the needs in embedded applications---especially the
limited channel capacity between a sensor unit and a processor that
monitors---we pursue the idea of filtering as preprocessing for monitoring.
Technically, for a given pattern automaton, we present a construction of a
Moore machine that works as a filter. The construction is automata-theoretic,
and we find the use of Moore machines particularly suited for embedded
applications, not only because their sequential operation is relatively cheap
but also because they are amenable to hardware acceleration by dedicated
circuits. We prove soundness (i.e., absence of lost matches), too. We work in
two settings: in the untimed one, a pattern is an NFA; in the timed one, a
pattern is a timed automaton. The extension of our untimed construction to the
timed setting is technically involved, but our experiments demonstrate its
practical benefits.
