Servo motor code with ramping

Status
Not open for further replies.

Electro nS

Full Member level 6
Joined
Mar 9, 2013
Messages
324
Helped
49
Reputation
98
Reaction score
48
Trophy points
1,308
Visit site
Activity points
3,818
i have implemented several codes for servo motors ( DC + encoder ) in C

the PID loop calculates at specific timing the error and off course P then I then D terms amplify the error to get the required PWM . ( which if error is big the starting PWM is HIGH (exp 50%)

everything is fine so far with small motors . but with big motors (high current) this high value cannot be used directly unless you want to see smoking mosfets . There need to be soft start , or ramping .

NOW how the h*** can this be implemented in addtion to PID !!! does this what commercial controllers do ?? or is there something i am missing ?


and please donot ask me to put my code here (its against company policy!!!)

thanks for help in advance
 

thanks for the reply but this is not very informative , i already have current limiting , ( when the current sensed reaches the maximum value the controller decrease voltage or stops drivers )

but the problem i am facing is not overcurrent as i beleive but instead overvoltage cause by inductive load (motor) stoping or starting fastly .

for example my mosfets are rated for 60v 100A , the motor is 24v 10A max (at stall), but if i stop the motor suddenly in the PID (fast PID response ) the mosfets are burning.

could this be a hardware problem be the lack of flyback diodes ( i depend on the ones inside the mosfet ) ? could big snubbers across mosfets or motor terminals be a solution ??

by the way i am using sign magnitude topology with regenerative braking ( IR2184 gate driver )
 

From the present level of information, I can only say, this shouldn't happen. Regular H-bridges don't need additional means against overvoltages (and not even snubbers with a good layout).

Where does the energy go in regenerative braking or fast stop? It shouldn't be a a problem with battery supply, but other power supplies may need a braking resistor and respective switch, otherwise the DC bus voltage can be raised above save limits.
but the problem i am facing is not overcurrent as i beleive but instead overvoltage cause by inductive load (motor) stoping or starting fastly .
Saying you have a problem with inductive load during start sounds like another word for stating that the H-bridge isn't able to work up to specified load.

The difference between resistive and inductive load is that the current continues to flow in the inductive case and is commutated between bridge transistors. The IR2184 fixed 500 ns dead time is relative high and will cause temporary commutation to MOSFET substrate diodes. This causes additional losses and (possibly more problematic) fast reverse recovery transients. Crosstalk to gate drivers can cause false switching. If circuit inductances are high, inductive overvoltages inside the H-bridge may drive the transistors into avalanche operation, possibly exceeding rated avalanche energies.

To sort out these parasitic effects, measurements with output inductance under different load conditions are necessary.
 
thank you very much , i know know one of the bad things i was doing is testing with bench power supply , so i should stop that ! and use battery with fuze for protection.

the thing that surprize me is that the 500ns dead time is too large ( my switching freqeuncy is 20Khz) which means the period is 50us so 500ns is 1% of duty cycle !! i was think of getting IR21844 to increase this time because i feared that short through might happen , but you are making me reconsider , can you confirm this ?? how much should the dead time be ??
and does using external diodes better (or necessary) than relying on the ones inside the mosfet ??
 

For symmetrical gate currents, I would expect optimal deadtime in a 100 to 200 ns range. If you keep a minimum, it's safe to adjust the deadtime for best efficiency. At 20 kHz, the additional losses by using 500 ns deadtime are possibly not very high. But reverse recovery losses definitely play a role if your MOSFETs don't have very fast body diodes.

External diodes, even schottky diodes, are usually not very effective for the first microseconds because circuit inductances steer most of the curent into the body diodes, unless you manage to utilize fully sychronous switching.
 
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…