Go to Post I would be thankful to just participate in champs, I would be happy with just that. - Brandon_L [more]
Home
Go Back   Chief Delphi > Technical > Motors
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-02-2009, 20:17
ellisk ellisk is offline
Registered User
FRC #1540
 
Join Date: Dec 2008
Location: Vancouver, WA
Posts: 41
ellisk is on a distinguished road
Are motor speeds proportional to PWM value?

Hi everyone,
I apologize in advance if I ask(ed) a stupid question. I'm a software person, so sometimes I don't know what I'm talking about.

My question is: is the motor speed proportional to PWM value? For example, if I set (in software) the motor to spin at half value, will it go half as fast as it would at full power? Would it depend on the motor/speed controller? (we're using Jaguars).

Thanks,
Kevin
  #2   Spotlight this post!  
Unread 03-02-2009, 20:31
David Brinza's Avatar
David Brinza David Brinza is offline
Lead Mentor, Lead Robot Inspector
FRC #0980 (ThunderBots)
Team Role: Mentor
 
Join Date: Feb 2003
Rookie Year: 2003
Location: Glendale, CA
Posts: 1,379
David Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond reputeDavid Brinza has a reputation beyond repute
Re: Are motor speeds proportional to PWM value?

There's no such thing as stupid questions, even from a software person.

I know that the Victors were quite non-linear. They had a significant "deadband" near the mid-point (zero-velocity). Motor speed increased approximately linearly over a small range PWM values then would approach max speed asymptotically. The characteristics varied significantly from Victor to Victor as well.

You can measure motor speed vs Jaguar input with an encoder pretty easily. It would be good to do this free-running and with a mechanical load on the motor as well.
__________________
"There's never enough time to do it right, but always time to do it over."
2003 AZ: Semifinals, Motorola Quality; SoCal: Q-finals, Xerox Creativity; IRI: Q-finals
2004 AZ: Semifinals, GM Industrial Design; SoCal: Winners, Leadership in Controls; Championship: Galileo #2 seed, Q-finals; IRI: Champions
2005 AZ: #1 Seed, Xerox Creativity; SoCal: Finalist, RadioShack Controls; SVR: Winners, Delphi "Driving Tomorrow's Technologies"; Championship: Archimedes Semifinals; IRI: Finalist
2007 LA: Finalist; San Diego: Q-finals; CalGames: Finalist || 2008 San Diego: Q-finals; LA: Winners; CalGames: Finalist || 2009 LA: Semifinals; Las Vegas: Q-finals; IRI: #1 Seed, Finalist
2010 AZ: Motorola Quality; LA: Finalist || 2011 SD: Q-finals; LA: Q-finals || 2013 LA: Xerox Creativity, WFFA, Dean's List Finalist || 2014 IE: Q-finals, LA: Finalist, Dean's List Finalist
2016 Ventura: Q-finals, WFFA, Engineering Inspiration
  #3   Spotlight this post!  
Unread 03-02-2009, 20:34
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,599
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Are motor speeds proportional to PWM value?

I participated in FIRST for 10 years before I ever thought to about this question. Especially with the Victor speed controllers, the answer is no. The Jaguars are much better.

See this thread on the FIRST forums: http://forums.usfirst.org/showthread.php?t=10182
  #4   Spotlight this post!  
Unread 03-02-2009, 20:34
intellec7's Avatar
intellec7 intellec7 is offline
108 programmer
AKA: Gustavo
FRC #0108 (SigmaC@ts)
Team Role: Programmer
 
Join Date: Sep 2005
Rookie Year: 2006
Location: Hollywood, Florida
Posts: 65
intellec7 is on a distinguished road
Send a message via AIM to intellec7 Send a message via MSN to intellec7
Re: Are motor speeds proportional to PWM value?

In general, no. The PWM value is proportional to the (average) voltage coming out of the speed controller. The motors voltage/RPM curve is not very linear and it depends on the torque on the motor, amperage it can draw and perhaps other factors. If you put an encoder on your motor, you could plot this PWM/RPM graph and see what the curve looks like.
  #5   Spotlight this post!  
Unread 03-02-2009, 20:42
Russ Beavis Russ Beavis is offline
Registered User
no team
 
Join Date: Nov 2005
Location: Manchester, NH - DEKA R&D Corp.
Posts: 341
Russ Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond reputeRuss Beavis has a reputation beyond repute
Re: Are motor speeds proportional to PWM value?

If you search the forums (or is it "fora"?), you should find a few whitepapers and threads that describe the operation of DC brush motors. I'll give you a super-high-altitude summary.

With no frictional load attached to (or inside) the motor, a perfect power supply and a motor drive that efficiently and linearly converts PWM command into voltage, the motor speed will indeed be proportional to the PWM value. That's a whole lot of IFs...

In general, approximating speed with PWM value is often good enough. But only you can know what's "good enough" for your application. Deviations from that ideal can be due to nonlinear or inefficient motor drives, power supply sagging or frictional loads. There are also transient effects due to rotational inertia to consider.

It's actually a really fun system to model. Do a search through CD and you'll find some good resources if you'd like to learn more.

Russ
  #6   Spotlight this post!  
Unread 03-02-2009, 21:05
Bob Steele's Avatar
Bob Steele Bob Steele is offline
Professional Steamacrit Hunter
AKA: Bob Steele
FRC #1983 (Skunk Works Robotics)
Team Role: Coach
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Seattle, Washington
Posts: 1,539
Bob Steele has a reputation beyond reputeBob Steele has a reputation beyond reputeBob Steele has a reputation beyond reputeBob Steele has a reputation beyond reputeBob Steele has a reputation beyond reputeBob Steele has a reputation beyond reputeBob Steele has a reputation beyond reputeBob Steele has a reputation beyond reputeBob Steele has a reputation beyond reputeBob Steele has a reputation beyond reputeBob Steele has a reputation beyond repute
Re: Are motor speeds proportional to PWM value?

Just a little correction here... the PWM signal will pulse the voltage.
The voltage does not change it is pulsed to achieve the speed you desire from the motor.

PWM control (Pulse Width Modulation) varies the width of these pulses of voltage (presumably at 12 V) to achieve this control.
The motors see the same voltage at all times...

This is different than a "dimmer" type of motor controller .... which actually varies the voltage in order to speed up or slow down the motor.
This is inherently inefficient because the lower voltage will provide less power along with the slower speed. We want to maintain the power, by using the same voltage at all times.

If you google Pulse Width Modulation it will tell you all about it.

good luck this year!!
__________________
Raisbeck Aviation High School TEAM 1983 - Seattle, Washington
Las Vegas 07 WINNER w/ 1425/254...Seattle 08 WINNER w/ 2046/949.. Oregon 09 WINNER w/1318/2635..SEA 10 RCA ..Spokane 12 WINNER w/2122/4082 and RCA...Central Wa 13 WINNER w/1425/753..Seattle 13 WINNER w/948/492 & RCA ..Spokane 13 WINNER w/2471/4125.. Spokane 14 - DCA --Auburn 14 - WINNER w/1318/4960..District CMP 14 WINNER w/1318/2907, District CMA.. CMP 14 Newton Finalist w 971/341/3147 ... Auburn Mountainview 15 WINNER w/1318/3049 - Mt Vernon 15 WINNER w/1318/4654 - Philomath 15 WINNER w/955/847 -District CMP 15 WINNER w/955/2930 & District CMA -CMP Newton -Industrial Design Award

  #7   Spotlight this post!  
Unread 03-02-2009, 22:09
skidmarks skidmarks is offline
Registered User
FRC #0957 (WATSON)
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Albany, Oregon
Posts: 19
skidmarks is an unknown quantity at this point
Re: Are motor speeds proportional to PWM value?

With most small (toy type) motors, their unloaded rpm (after settling, as I'll explain later) is directly proportional to the voltage they get. However, I don't know about the larger motors we are using and how they behave under load. Plus, the PWM output from the motor controllers may not drive a motor to behave the same way as the average voltage would. In addition, the motor controller's outputs aren't perfect - most of them are nonlinear, as I read (this is my first year so I don't have much personal experience.) In the end, they are probably very nonlinear, due to all the factors affecting your perfect relationship.

If you look at the math, in a closer to instantaneous standpoint, the PWM (or average voltage) setting would actually control motor acceleration (get more instantaneous and you get into the back EMF and weird effects such as some motors, depending on how they are wound, actually speeding up when power is cut.) Plus, instantaneously, the PWM wouldn't cycle immediatly. The motor controller would take something around 1/(operating frequency) seconds to change the outputs, and over time it is averaged my the motor's behavior to act as an average voltage.

At the speed you would probably run your program (20-1000 Hz for an overly large range estimate) you would probably (using the encoders) detect the motor behaving as if the PWM output is proportional to acceleration. Most programs (except traction control and other fancier ones) just run the commanded power to the PWM outputs, and assume (over time, correctly) the PWM output has a one-to-one relationship with average motor velocity.
  #8   Spotlight this post!  
Unread 07-02-2009, 12:06
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,798
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Are motor speeds proportional to PWM value?

Everyone so far has neglected the motor power curves showing speed vs voltage vs load vs torque. None of the motors are linear except when no load is connected, so none of the motors connected to speed controllers can be linear. Furthermore, speed controllers apply varying pulse width to vary the average current in the motor not the average voltage. The voltage is always switched between 0 and 12 volts less the voltage drop in the wiring and FETs. The switching frequency also interacts with the segment spacing on the motor commutator and the winding inductance. Although motor manufacturing variations minimize winding inductance variances, they still exist and different motor types have wide variations in inductance, winding resistance and segment lengths. Since motors, speed contollers and drive PWM are never synchronized, neither are motor control outputs, rotations or exact output powers. Light dimmers also vary the pulse width but they synchronize to the power line to reduce RFI and the "singing" of incandescent filaments when power is switched on near the peak of a sine wave. This is often referred to as "zero cross switching".
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #9   Spotlight this post!  
Unread 07-02-2009, 12:26
Rick TYler Rick TYler is offline
A VEX GUy WIth A STicky SHift KEy
VRC #0010 (Exothermic Robotics)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Redmond, Washington
Posts: 2,000
Rick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond reputeRick TYler has a reputation beyond repute
Re: Are motor speeds proportional to PWM value?

Even before I read Al's impressive post, I was thinking that this is nearly a chaotic system, and the only good way to guarantee a desired result (such as "I want to go 20% faster") is to test YOUR controllers, batteries, mechanisms, drive train, and wheels and map the desired PWM values to the desired behavior of the motor/device you are controlling. In this case, empiricism is better than theory, although it certainly doesn't hurt to learn the theory, too.
__________________
Exothermic Robotics Club, Venturing Crew 2036
VRC 10A, 10B, 10D, 10Q, 10V, 10X, 10Z, and 575
  #10   Spotlight this post!  
Unread 07-02-2009, 12:49
AndrewN's Avatar
AndrewN AndrewN is offline
it's alive!
AKA: Andrew Nicholson
FRC #1778 (Chill Out)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Edmonds, WA
Posts: 48
AndrewN is just really niceAndrewN is just really niceAndrewN is just really niceAndrewN is just really niceAndrewN is just really nice
Re: Are motor speeds proportional to PWM value?

All good answers. For accurate speed control you have to close the feedback loop. The typical way is to add an encoder which measures the speed of the wheels. Without a way to measure speed you have an open loop with no feedback, you set the control value and hope.

A closed feedback loop sets the control value (servo pwm) to the motor controller, the controller pulses the 12V to the motor, also called PWM but different, the motor under load does it's thing, the drive train takes some power through friction, the wheels turn, you measure the speed and increase or decrease the motor control value based on the difference between what you are reading and what you desired.

This is a simple explaination of proportional feedback, look up PID on CD for many articles.
__________________
Andrew Nicholson
2011 FRC Robot Inspector (Seattle, Portland)
Mentor FRC 1778 "Chill Out", FTC 3018, 3940 "Hawks", 4434 "Heat Misers"

"Everything should be made as simple as possible, but no simpler."
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is the maximum PWM value 254 or 255? markulrich Programming 14 02-07-2008 01:50
Robot Controller reset issue when pwm value changes wt200999 Programming 4 04-01-2008 22:15
Proportional Control ShadowFlame Programming 0 14-02-2004 11:53
Dividing PWM value - easy question jgannon Programming 1 04-02-2004 22:57
Encoder Counts/time period to PWM value Zee Programming 10 04-02-2004 01:41


All times are GMT -5. The time now is 15:22.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi