Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.arch.embedded > #20098
| From | al.basili@gmail.com (alb) |
|---|---|
| Newsgroups | comp.arch.embedded |
| Subject | encoders measurements in speed control loop |
| Date | 2015-02-16 09:22 +0000 |
| Message-ID | <ckdr69F3at4U1@mid.individual.net> (permalink) |
Hi everyone, I have to control a sinusoidal BLDC through a PWM and an H-bridge, following a profile written in a table. I have encoders reading as feedback but I have not quite well understood how to measure the difference between the position table and the encoders reading. In general if the encoder reading is in the same turn as the table than everything is fine: p = 78 deg (position) m = 75 deg (measure) e = p - m = 3 deg But when I cross the 0 deg (360 deg) I have some stupid issues with signs: p = 359 deg m = 1 deg e = p - m = 358 deg while I would like to get -2 deg! Even with modulo function I'd not be better off: e = mod(p - m, 360) = 358 deg! Should it be dependent on the quadrant I'm in? I'm missing some basics here. And yes, a pointer to elementary school math is definitely appreciated! Al -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?
Back to comp.arch.embedded | Previous | Next — Next in thread | Find similar | Unroll thread
encoders measurements in speed control loop al.basili@gmail.com (alb) - 2015-02-16 09:22 +0000
Re: encoders measurements in speed control loop al.basili@gmail.com (alb) - 2015-02-16 10:06 +0000
Re: encoders measurements in speed control loop Grant Edwards <invalid@invalid.invalid> - 2015-02-16 15:21 +0000
Re: encoders measurements in speed control loop Tim Wescott <tim@seemywebsite.com> - 2015-02-16 10:30 -0600
Re: encoders measurements in speed control loop Grant Edwards <invalid@invalid.invalid> - 2015-02-16 17:07 +0000
Re: encoders measurements in speed control loop Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2015-02-16 20:09 +0200
Re: encoders measurements in speed control loop langwadt@fonz.dk - 2015-02-16 11:52 -0800
Re: encoders measurements in speed control loop Bruce Varley - 2015-02-17 20:14 +0800
Re: encoders measurements in speed control loop Tim Wescott <seemywebsite@myfooter.really> - 2015-02-17 13:03 -0600
Re: encoders measurements in speed control loop Bruce Varley - 2015-02-18 20:38 +0800
Re: encoders measurements in speed control loop Tim Wescott <seemywebsite@myfooter.really> - 2015-02-20 12:27 -0600
csiph-web