PWM mode used in snapamp for driving a DC brushed motor

Moderators: TomKerekes, dynomotion

Post Reply
rdpdo2002
Posts: 12
Joined: Sat Mar 23, 2019 6:34 pm

PWM mode used in snapamp for driving a DC brushed motor

Post by rdpdo2002 » Mon Mar 25, 2019 8:05 am

Hello,

Is this right that the pwm mode used by Snapamp is a current loop mode when I select an axis with ouput DC BRUSH MOTOR, so, the max value under the step responses can be 1000 max ?

Is it possible to drive the output with a normal pwm mode instead of the current mode (as it is possible by entering pwm / pwmc command line) with max values 255 ?

I am trying to modelise the controller under matlab/simulink, but I have no information about the functionnal design of the pwm current loop mode... Do you have some functionnal diagram wich can help me to implement this in matlab/simulink to modelise that ?

I already make some measurement on my motor (back emf, inertia, etc...) and currently my simulation under simulink work with a PID wich drive a pwm 0-100% in voltage mode to drive my motor, but if snapamp only use current loop mode, I would like to implement this in my design...

Thanks you very much for your support.

Regards.

User avatar
TomKerekes
Posts: 2677
Joined: Mon Dec 04, 2017 1:49 am

Re: PWM mode used in snapamp for driving a DC brushed motor

Post by TomKerekes » Mon Mar 25, 2019 5:01 pm

Hi rdpdo2002,
Is this right that the pwm mode used by Snapamp is a current loop mode when I select an axis with ouput DC BRUSH MOTOR, so, the max value under the step responses can be 1000 max ?
Yes but it is actually 1023 = 35Amps
Is it possible to drive the output with a normal pwm mode instead of the current mode (as it is possible by entering pwm / pwmc command line) with max values 255 ?
It would be possible using a C Program to output to the PWM. The max value is actually 511.
I am trying to modelise the controller under matlab/simulink, but I have no information about the functionnal design of the pwm current loop mode... Do you have some functionnal diagram wich can help me to implement this in matlab/simulink to modelise that ?
The current loop is simply proportional gain where:

PWM = (Commanded Current - Measured Current) x Gain

The default Gain = 16 This is computed every PWM cycle at 32.55KHz

The Currents are 10-bit values + sign and the PWM is an 9-bit value + sign

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

rdpdo2002
Posts: 12
Joined: Sat Mar 23, 2019 6:34 pm

Re: PWM mode used in snapamp for driving a DC brushed motor

Post by rdpdo2002 » Mon Mar 25, 2019 5:13 pm

Thanks you !

Post Reply