I am student doing my dissertation on domestic demand side management through frequency measurement for grid stability. My plan is to make a prototype frequency measuring device apparently there are existing matlab scripts and models for frequency measuring circuits but I can't seem to find them does anyone know where I might find such a thing?