From 376828cba34f417d2df04878c8ef7fcd87303b66 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 6 Aug 2007 10:52:58 +0200 Subject: Added encoder computations to choose between different decoding solutions. --- digital/asserv/doc/encoders.m | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 digital/asserv/doc/encoders.m diff --git a/digital/asserv/doc/encoders.m b/digital/asserv/doc/encoders.m new file mode 100644 index 00000000..03b287a0 --- /dev/null +++ b/digital/asserv/doc/encoders.m @@ -0,0 +1,31 @@ +disp ('max encoder freq (Hz), from datasheet'); +f_max = 100000 +disp ('pulse per revolution'); +n = 500 +disp ('max angular speed (tr/s)'); +f_max/n +disp ('max angular speed (tr/min)'); +f_max/n * 60 + +disp ('one state length (deg)'); +phy_deg = [90-15, 90+15] +disp ('one state length at max freq (s)'); +phy = 1/f_max * (phy_deg / 360) +disp ('minimum state length (s)'); +min_phy = min (phy) + +disp (''); + +disp ('AVR freq (Hz)'); +avr_f = 16000000 +disp ('AVR instructions per cycle'); +avr_instr = [32, 22] +disp ('AVR cycle length (s)'); +avr_cycle = avr_instr / avr_f + +disp (''); + +disp ('CPLD cycles needed for correct detection with an input filter'); +cpld_cy = 5 +disp ('CPLD needed frequency (Hz)'); +cpld_f = cpld_cy / min_phy -- cgit v1.2.3