Design calculations

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "== Maximul speed== Motor has 5600 RPM at 6V no load. Gearing is 9.68:1 Wheel diameter is 6cm. This gives a max speed of 5600/60/9.68*0.06*Pi = 1.8m/s == Encoder calculation...")
 
(Speed calculation)
 
(16 intermediate revisions by one user not shown)
Line 1: Line 1:
== Maximul speed==
+
Back to [[Regbot]] main page
 +
 
 +
 
 +
== Maximum speed==
  
 
Motor has 5600 RPM at 6V no load.
 
Motor has 5600 RPM at 6V no load.
Line 6: Line 9:
  
 
This gives a max speed of 5600/60/9.68*0.06*Pi = 1.8m/s
 
This gives a max speed of 5600/60/9.68*0.06*Pi = 1.8m/s
 +
 +
(with a maximum motor voltage of 9V should - for short periods - allow up to 2.7m/s).
  
 
== Encoder calculations==
 
== Encoder calculations==
Line 17: Line 22:
 
Speed is calculated based on time between encoder ticks
 
Speed is calculated based on time between encoder ticks
  
At max speed there should be approx 4.48 encoder ticks per ms, or 223 us between tics
+
At max speed there should be approx 4.48 encoder ticks per ms, or 223 us between tics.
The timing base is pt. 10us, so velocity resolution is rather bad at high speeds.
+
If there is more than one encoder tick within 1ms, then the velocity is averaged over 1 ms. At lower speed the velocity gets updated at every tick time (fewer than one encoder tick in 1 ms).
This can be improved by averaging if time between encoder is smaller than sample time.
+
If time between encoder pulses is more than 0.5 sec, then speed is set to 0.
 +
If time since last encoder tick is longer than last encoder tick period, then velocity is based on time since last tick (up to 0.5 sec, where the speed is set to 0). I.e. the minimum speed measured is 2*0.0041 m/s = 0.81cm/sec.
 +
 
 +
Sample time is (pt.) 1ms.
 +
 
 +
At low speed the time between encoder ticks make the calculated wheel velocity delayed, resulting in poor controller performance (or even instability).
 +
A velocity estimator is implemented based on anchor voltage and current velocity. This is then high-pass filtered and added to the encoder based velocity.
 +
This function currently disabled - gave problems while balancing.
 +
 
 +
The motor big controller has problems with low (and high) PWM values at the used 20kHz switch rate. This gives almost no motor power if PWM is less than 7-10%.
 +
Lower switch frequency may give problems with audio noise and high peak current in anchor coils. The tiny motor controller has much higher BW, but noise from switching can give false encoder pulses, and thus there is mounted 1-4.7nF filter capacitors on the encoder lines.
  
 
== Parameter estimation==
 
== Parameter estimation==
  
 
Pololu say that at 6V stall current is 2.2A, or R_A =  2.7 Ohm
 
Pololu say that at 6V stall current is 2.2A, or R_A =  2.7 Ohm
 +
 +
On this robot the total anchor resistance is estimated to about 3.3 Ohm (including H-bridge and wires) based on current step response.

Latest revision as of 09:50, 24 May 2019

Back to Regbot main page


Contents

[edit] Maximum speed

Motor has 5600 RPM at 6V no load. Gearing is 9.68:1 Wheel diameter is 6cm.

This gives a max speed of 5600/60/9.68*0.06*Pi = 1.8m/s

(with a maximum motor voltage of 9V should - for short periods - allow up to 2.7m/s).

[edit] Encoder calculations

The encoder has 48 ticks per revolution. This gives 48*9.68 = 464.64 ticks per wheel revolution, or Distance per tick = pi*0.06/464.64 = 0.40568 mm/tick

[edit] Speed calculation

Speed is calculated based on time between encoder ticks

At max speed there should be approx 4.48 encoder ticks per ms, or 223 us between tics. If there is more than one encoder tick within 1ms, then the velocity is averaged over 1 ms. At lower speed the velocity gets updated at every tick time (fewer than one encoder tick in 1 ms). If time between encoder pulses is more than 0.5 sec, then speed is set to 0. If time since last encoder tick is longer than last encoder tick period, then velocity is based on time since last tick (up to 0.5 sec, where the speed is set to 0). I.e. the minimum speed measured is 2*0.0041 m/s = 0.81cm/sec.

Sample time is (pt.) 1ms.

At low speed the time between encoder ticks make the calculated wheel velocity delayed, resulting in poor controller performance (or even instability). A velocity estimator is implemented based on anchor voltage and current velocity. This is then high-pass filtered and added to the encoder based velocity. This function currently disabled - gave problems while balancing.

The motor big controller has problems with low (and high) PWM values at the used 20kHz switch rate. This gives almost no motor power if PWM is less than 7-10%. Lower switch frequency may give problems with audio noise and high peak current in anchor coils. The tiny motor controller has much higher BW, but noise from switching can give false encoder pulses, and thus there is mounted 1-4.7nF filter capacitors on the encoder lines.

[edit] Parameter estimation

Pololu say that at 6V stall current is 2.2A, or R_A = 2.7 Ohm

On this robot the total anchor resistance is estimated to about 3.3 Ohm (including H-bridge and wires) based on current step response.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox