Go to Post Success is realizing that anything is possible, persistence is the key. - SlamminSammy [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
  #31   Spotlight this post!  
Unread 04-01-2011, 17:30
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Modeling motor control

The motors are barely warm.
I think I have to run them for 10-15 minutes at full power to warm them up.
__________________
-- Marshal Horn
  #32   Spotlight this post!  
Unread 04-01-2011, 18:47
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: Modeling motor control

Marshall,
In looking at the schematic, the data for Vout would appear to be a calculation based on the supply voltage to the output stages (Vsense) and the percent of the output PWM commanded for output. In most cases, this should give you good data in the normal operating range for FRC motors. It cannot compensate for voltage drops due to wiring and motor lead length nor can it compensate for LR distortions at low values of pulse width as discussed earlier. At true free speeds, is likely to be inaccurate as well.

As an edit, I just thought of something. Are these brand new motors that you are testing? There may be some discontinuity while the brush assembly is wearing into the commutator shape. Also, I wonder what the reaction time to a command is once the motor starts to speed up. It surely will take a finite time to get the mass moving at a new speed. I wonder if 200msec is long enough. (thinking out loud here)
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.

Last edited by Al Skierkiewicz : 04-01-2011 at 18:50.
  #33   Spotlight this post!  
Unread 04-01-2011, 19:15
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Modeling motor control

Would you give an estimate on the accuracy?

Neither of these motors are new. The first one has at least 20 hours of sine-wave operation. The second one has been used as a drill and a robot manipulator.
__________________
-- Marshal Horn
  #34   Spotlight this post!  
Unread 04-01-2011, 19:21
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: Modeling motor control

Quote:
Originally Posted by kamocat View Post
The first one has at least 20 hours of sine-wave operation.
Can you explain that?
I wouldn't know where to start with an estimate. I am wondering why you are trying to evaluate for torque now that we have arrived at this spot. Except for the low RPM, you should be able to make calculations from the current and motor voltage since the variables will remain rather constant. Are you just trying to keep part count low?
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #35   Spotlight this post!  
Unread 04-01-2011, 19:24
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Modeling motor control

I'm trying to make this software based, using hardware other teams have easily available.
It's a motor-selection tool, to determine the speed and torque requirements of your mechanism.
__________________
-- Marshal Horn
  #36   Spotlight this post!  
Unread 04-01-2011, 19:43
Chris is me's Avatar
Chris is me Chris is me is offline
no bag, vex only, final destination
AKA: Pinecone
FRC #0228 (GUS Robotics); FRC #2170 (Titanium Tomahawks)
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2006
Location: Glastonbury, CT
Posts: 7,790
Chris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond reputeChris is me has a reputation beyond repute
Send a message via AIM to Chris is me
Re: Modeling motor control

Quote:
Originally Posted by kamocat View Post
I'm trying to make this software based, using hardware other teams have easily available.
It's a motor-selection tool, to determine the speed and torque requirements of your mechanism.
Why not mathematically solve this using motor specifications and force / torque calculations?
__________________
Mentor / Drive Coach: 228 (2016-?)
--2016 Waterbury SFs (with 3314, 3719), RIDE #2 Seed / Winners (with 1058, 6153), Carver QFs (with 503, 359, 4607)
Mentor / Consultant Person: 2170 (2017-?)
.
College Mentor: 2791 (2010-2015)
-- 2015 TVR Motorola Quality, FLR GM Industrial Design -- 2014 FLR Motorola Quality / SFs (with 341, 4930)
-- 2013 BAE Motorola Quality, WPI Regional #1 Seed / Delphi Excellence in Engineering / Finalists (with 20, 3182)
-- 2012 BAE Imagery / Finalists (with 1519, 885), CT Xerox Creativity / SFs (with 2168, 118)
Student: 1714 (2009) - 2009 MN 10K Lakes Regional Winners (with 2826, 2470)
2791 Build Season Photo Gallery - Look here for mechanism photos My Robotics Blog (Updated April 11 2014)
  #37   Spotlight this post!  
Unread 04-01-2011, 20:04
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,746
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Modeling motor control

I've now deciphered the current sampling strategy employed by the Jaguars. It's a pretty simple scheme, they probably just wanted a robust fast solution over the broad range of motor inductances, etc. Anyways, the current, bus voltage, analog input, and temperature are sampled every PWM cycle, with an offset to put the sample in the middle of the PWM pulse (15.625 kHz). Voltage, analog, and temperature are used as-is, no filtering whatsoever.

The voltage returned over CAN is, indeed, the instantaneous bus voltage scaled by the percent command.

Current, on the other hand, is put through a 16x super-sampling, 8-point moving average filter. That is, 16 consecutive samples are put into a bucket, and when the bucket is full, it's averaged with the last 7 buckets, and that's your new current value till the next bucket's full.

So you end up with something like a 976Hz update rate for the current, but a bandwidth of something like 122Hz or less. Of the instantaneous value in the middle of the PWM pulse, lest we forget. This is the value reported back over CAN, and also used for current control mode. Interestingly, the instantaneous value is used for I2T overcurrent protection, which is set for 23A over 46A for 2 seconds (ie. 69A for 2s, or 78A for 1s, etc.).

No, I don't know why the overload specs differ from the specs in the data sheet. Either they fudged the DS numbers down for safety, or their conversion functions are wrong by that amount, which seems unlikely.

This is all assuming the FRC firmware is identical in these regards to the reference design firmware on Luminary Micro's site, of course. I'm not going to decompile the FRC firmware unless lives are at stake of something.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
  #38   Spotlight this post!  
Unread 04-01-2011, 20:22
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Modeling motor control

Quote:
Originally Posted by Kevin Sevcik View Post
I've now deciphered the current sampling strategy employed by the Jaguars...

current... [is] sampled every PWM cycle, with an offset to put the sample in the middle of the PWM pulse...

Current ... is put through a 16x super-sampling, 8-point moving average filter.
Nice work! Thank you for this information!

So the Jag firmware is doing both: digital filtering and phase-locking the sample to the bridge switching.

Quote:
So you end up with something like a 976Hz update rate for the current, but a bandwidth of something like 122Hz or less.
Well, the 976Hz makes sense, since the PID in the Jags is updated at about the same rate.

Quote:
Of the instantaneous value in the middle of the PWM pulse, lest we forget.
Right. Now the question now becomes: what is the relationship between this metric, RMS, and algebraic average.






Last edited by Ether : 04-01-2011 at 20:29.
  #39   Spotlight this post!  
Unread 04-01-2011, 22:02
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Modeling motor control

Marshall -

To account for motor heating, consider re-ordering your tests pseudo-randomly. This will spread the time dependent effects across your sample space. Hopefully, this will result in a curve that makes more sense (but will likely be "wider").


Calculating effective motor voltage from Vbus * Duty Cycle is actually a pretty good method as long as the motor current is continuous (doesn't go to zero), and your measurement of Vbus is good enough.

Measuring Vbus half way through the pulse is a reasonably standard method. Assume that the applied voltage waveform looks roughly like a trapezoid: It starts at Vbus nominal when the switch starts, linearly(ish) droops due to increasing IR loss, and then goes to zero when the switch stops. The measured Vbus looks just like this, but with some ugly ringing around the transitions. By measuring halfway through, we kill two birds:
1) We are far away from the ringing.
2) We effectively take the average of the Vbus across the cycle (if it droops linearly).
Pretty sweet, eh? Simple way to get a darn good estimation. If you think about 2) a bit, you'll see why there usually isn't a filter in place - it would mess up the reading! If there is one, it usually has a very small time constant compared to the pulse width.

Continuous current is absolutely key to using effective motor voltage calculations - if the current stops, the underlying assumptions fall apart entirely. This is "The Big Difference"(TM) between Jaguars and Victors, and is why they have such different responses.
In a continuous current control mode, the effective motor voltage is (nearly) equivalent to what would happen with a pure DC source of the same voltage.

The reason for this gap is that when current is stops flowing, the motor is effectively floating with no applied voltage. If current is always flowing, the motor controller is always in control of the applied voltage.

Continuous current occurs whenever the off period is shorter than the amount of time it takes the current to decay to zero. Mathematically, this puts a relationship between switch frequency (on and off periods, actually) and minimum average current. That is to say that for a given frequency and duty cycle, there is a minimum average current to establish continuous current control. For a Jaguar, this is a few amps. For a Victor, this is a few hundred.
  #40   Spotlight this post!  
Unread 04-01-2011, 23:13
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Modeling motor control

Quote:
Originally Posted by Ether View Post
The average torque generated by the motor is proportional to the algebraic average current, assuming Kt is constant (which in real life it is not, but for most practical purposes it is assumed to be).

The output torque at the motor shaft is equal to the torque generated by the motor, minus the torque losses within the motor.
Is torque loss proportional to speed of the motor?


Will 5A at 4v produce the same internal torque as 5A at 10v?

Is the internal torque of a GEARBOX proportional to its speed?
__________________
-- Marshal Horn

Last edited by kamocat : 04-01-2011 at 23:19.
  #41   Spotlight this post!  
Unread 04-01-2011, 23:52
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Modeling motor control

Here's a CIM with a toughbox, using the same measurement system. Sorry, there's no encoder on it yet.


EDIT:
Here's a test using a random sampling sequence.
__________________
-- Marshal Horn

Last edited by kamocat : 05-01-2011 at 00:41.
  #42   Spotlight this post!  
Unread 05-01-2011, 01:24
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Modeling motor control

Quote:
Originally Posted by kamocat View Post
Is torque loss proportional to speed of the motor?
It depends on what you mean by "proportional". To me, "proportional" means means a y=k*x relationship. So the answer is no, because at zero speed there is a non-zero static friction torque loss.

Is torque loss linear with speed? Not really, but for simplicity it is usually modeled that way. For example, see this spreadsheet.

Here are some interesting links about internal torque loss vs speed for Globe and FP motors.


Quote:
Will 5A at 4v produce the same internal torque as 5A at 10v?
To a very good approximation, yes, as long as we're talking about the same waveform of 5A in each case.

Quote:
Is the internal torque of a GEARBOX proportional to its speed?
Well, it can vary with speed. A gearbox has static friction. It also has a speed-dependent loss. Both types of loss can vary substantially from one gearbox to the next, even for identical models. Even for one given gearbox the losses can vary as a function of temperature, lubrication, contamination, etc.


  #43   Spotlight this post!  
Unread 05-01-2011, 01:28
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Modeling motor control



Look at the difference in current waveforms for a CIM with locked rotor driven at 5% duty with a Jag vs a Victor.

This is a simulation using R=0.090 ohm & L = 200uH.


At 15KHz, the current varies from ~7.4amps to 7.7amps. The RMS is 7.6amps and the algebraic average is 7.6amps.

At 150Hz, the current varies from ~1.8amps to 18.7amps. The RMS is 8.4amps and the algebraic average is 6.7amps.

Since average motor torque is created by algebraic average current, and motor heating is created by RMS current, the 150Hz waveform produces less average torque and more motor heating.



Attached Thumbnails
Click image for larger version

Name:	CIM7.png
Views:	57
Size:	14.1 KB
ID:	9568  Click image for larger version

Name:	CIM8.png
Views:	58
Size:	15.8 KB
ID:	9569  

Last edited by Ether : 05-01-2011 at 02:09.
  #44   Spotlight this post!  
Unread 05-01-2011, 02:05
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Modeling motor control

Thank you for the straightforward answers.

Quote:
Originally Posted by Ether View Post
Quote:
Originally Posted by kamocat
Will 5A at 4v produce the same internal torque as 5A at 10v?
To a very good approximation, yes, as long as we're talking about the same waveform of 5A in each case.
How would I measure it in a way that any waveform with the same current would create the same torque? You said algebraic average?
__________________
-- Marshal Horn
  #45   Spotlight this post!  
Unread 05-01-2011, 02:32
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Modeling motor control

Quote:
Originally Posted by kamocat View Post
Thank you for the straightforward answers.

How would I measure it in a way that any waveform with the same current would create the same torque? You said algebraic average?
That's a fair question but the answer has a lot of ifs, ands, and buts.

If the waveform is nice and flat like a 5% 15Khz CIM curve then any sample taken with be both the algebraic average and the RMS, approximately.

If the waveform is an exaggerated sawtooth like a 5% 150Hz CIM curve, then you'd have to sample the instantaneous current and run it through a low-pass filter of some sort. You'd have to make sure your samples captured a reasonable picture of the entire waveform and were set up in such a way that aliasing didn't distort the results. OR, I think a better way would be to hardware-filter the raw analog signal (the amplified voltage across the shunt resistor) before it goes to the ADC. I think a filter could be designed that would give the algebraic average.



Last edited by Ether : 05-01-2011 at 02:48.
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
Encoder Motor Control Wicked NI LabVIEW 3 11-02-2009 18:21
Motor control problem Lablabla Programming 3 17-01-2007 15:27
Motor Control Systems Astronouth7303 Programming 3 05-04-2005 19:35
Four motor control judson Programming 1 14-02-2005 20:17
Motor Control archiver 2000 1 23-06-2002 23:01


All times are GMT -5. The time now is 11:13.

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