LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PI Current Control Loop

Solved!
Go to solution

Hello everyone,

 

I'm working on the current control of a DC motor using cRIO 9035 and NI 9505 module. I used PI Current Loop VI in order to implement it. I am testing the code without connecting the DC motor to the transmission system (no load on the motor). I have two questions about it. You can see the related part of my FPGA code in "currentcontrol.jpg". 

 

1) I determined the correct proportional and integral gains for the PI Control Loop. However, those values do not work all the time. When I trigger the PWM generation loop with ON/OFF boolean, if the correct gain values are used, the motor turns with maximum speed (100% duty cycle). I solved that problem by implementing a counter. When the boolean is ON, I use wrong gains until the counter reach a determined value (i.e. 100000). If the counter is greater than that value, I use correct gains and it works well in the case of motor direction does not change. But it does not make sense to me. Why do the correct gains not work all the time? Is there any way to solve this problem more properly?

 

2) When I generate the current setpoint as a sinusoidal signal, motor has to turn in both directions. As seen in "sinusoidalcurrent(2A).jpg", with amplitude of 2 A current setpoint, when the desired current is near zero, the motor direction does not change and turns with maximum duty cycle. When I set the amplitude as 4 A motor direction changes, but it still turns with maximum speed when the current is near zero (sinusoidalcurrent(4A).jpg). Changing the frequency of the current setpoint does not work as well. My guess is, when the current setpoint is close to zero, PI current loop reaches the voltage output limits and could not track the desired current setpoint. What do you think about that problem? How can I solve it?  

 

Thank you,

Best regards.     

0 Kudos
Message 1 of 3
(2,948 Views)

Hi okirtas, 

Can you attach your LabVIEW project as well? Thanks for the screenshots but having the code would be nice to go through. 

 

Angela L. 

National Instruments

0 Kudos
Message 2 of 3
(2,808 Views)
Solution
Accepted by topic author okirtas

Hello Angela L.,

 

Thank you for your reply. I figured out that those problems are caused because the motor has no load. When I connect the motor to the ball screw, PI current loop does not reach the voltage output limits and current tracking works (imperfect but feasible). You can see the measured sinusoidal current in the attachment.    

 

Oguzhan Kirtas

Bogazici University

0 Kudos
Message 3 of 3
(2,794 Views)