cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling two coherent motors using ST project and libraries

mlisi
Associate II
Posted on July 16, 2015 at 15:18

Hello everyone,

It's about a month that I work on a project of motor control, and I have some issues that I was not able to solve untill now.

I'm working on a ST microcontroller version 

STM32F207ZC, I

 explain the situation of my work:

I have a two wheel drive cart: each of these wheels is drvien by a brushless motor. There is no phisical axile between the two wheels, so their movement is not joint.

My goal is to simulate an axile between the wheels, so that the cart can move properly (the two drive wheels going at the same speed).

With the firmware downloaded on ST website and the precompiled librieries (MC Workbench and example project STM32F2xx_Workspace for Keil uVision) I am able to control both motors individually, and using the serial interface provided I can set t

o both motors the same reference speed, but what will happend if one of the 2 motors find an obstacle? One will sllow down while the other will continue running at the reference speed, and this will lead the cart to move in a wrong way (and, in extreme cases, also rotating on itself).

So what I would like to do is to set the 

two motors in such a way that if one slows down, the other follows, or otherwise I would like to introduce a position feedback control in the system (based on the optical encoder inside the motors), so that if one motors slows down, in a short amount of time it will recover the position by increasing it's speed above the reference speed (this could not be done with a speed control, because if the motor slows down and than returns running at its reference speed, the lost space with respect to the other motor will not be recovered, and the cart will continue to move in a wrong way).

How can I implement such idea with the firmware provided by ST?

Do you have any solution on how this could be done using the functions of the precompiled libraries?

Thank you

Marco

---------

Buongiorno a tutti

E' da circa un mese che lavoro su un progetto di controllo motore, e ho alcuni problemi che non sono stato in grado di risolvere fino ad ora.

Sto lavorando su un microcontrollore STM32F207ZC, questa � la situazione del mio lavoro:

Ho un carrello a due ruote motrici: ciascuna di queste � mossa da un motore brushless. Non c'� alcun assile fisico tra le due ruote, quindi il loro movimento � ''slegato''.

Il mio obiettivo � di simulare un assile tra le ruote, in modo che il carrello possa muoversi correttamente (le due ruote motrici che ruotano concordi alla stessa velocit�).

Con il firmware scaricato sul sito ST e le librerie precompilate (MC Workbench e progetto di esempio STM32F2xx_Workspace per Keil uVision) sono in grado di controllare entrambi i motori singolarmente, e utilizzando l'interfaccia seriale fornita posso impostare a entrambi i motori la stessa velocit� di riferimento, ma cosa  succede se uno dei 2 motori trova un ostacolo? Uno rallenter�, mentre l'altro continuer� a ruotare alla velocit� di riferimento, e questo porter� il carro a muoversi male e ''storto'' (e in un caso estremo anche a ruotare su se stesso).

Quindi, quello che vorrei fare � impostare i due motori in modo tale che se uno rallenta, l'altra segue, o altrimenti vorrei introdurre un controllo di retroazione sulla posizione nel sistema (basato sull'encoder ottico presente all'interno dei motori ), in modo che se uno motori rallenta, in un breve lasso di tempo recupera la posizione persa rispetto all'altro aumentando la sua velocit� al di sopra della velocit� di riferimento (cosa che non si potrebbe fare con un controllo solo sulla velocit�, perch� se il motore rallenta e ritorna in seguito alla velocit� di riferimento, lo spazio perso non verr� recuperato, e il carrello continuer� a viaggiare storto).

Come posso metter in pratica questa idea con il firmware fornito da ST?

Avete qualche soluzione su come questo potrebbe essere svolto utilizzando le funzioni delle librerie precompilate?

Grazie

Marco

#motor-control-foc-library #stm32-pmsm-foc-sdk
2 REPLIES 2
Gigi
Senior
Posted on September 07, 2015 at 15:19

Ciao Marco

There are a lot of functionality that is ready to be used even in the compiled version.

Few of them are present in the so called MC Interface (Start, Stop, getSpeed, getAngle, setSpeed) and other in the so called MC Tuning in wich you can customize any aspect of the FW by program.

So basically you have a lot of potentiality.

I'm not an expert of user level application but I think that having the information of each motor speed and each motor angle and having the control of the motor setting the reference speed or torque I'll play a little bit with him in order to get the required behaviour.

For the list of the complete API take a look to the STM32 FOC PMSM FW library vx_x developer Help file.chm in the DOC folder.

Ciao

Gigi

Laurent Ca...
Lead II

The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK). 

Best regards