LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID control: actual system elements and simulation elements

Dear 

I have  a dc motor with 12 volt operating and has a tacho meter for speed estimation with H-brighe for PWM [pusle width modulation]

 

its required to put pid controller to control speed 

 

basically  I will simulate the system before any implementation 

 

the problem is if I implement the transfer function (mathematical model )  of motor in labview 

 

for ex.[from control theory ] 

 

 w/v= 1/2s+1;

 

w: rad/s and v: is the applied voltage

      

so in simulation what is the input and output of this transfer function ?? Voltage,pulse width or anything?? if volatge what will its range 

and what its output will represent ?? speed ?? 

 

I mean I am confuse about connected theory or simulation [input and output ] with physical system [input and output ]

 

 

best regards 

hi ?Q>

0 Kudos
Message 1 of 7
(3,911 Views)

I don't know how the applied voltage would equal V in this case. It doesn't make sense to me. This article on PID control theory might help.

 

https://www.ni.com/en/shop/labview/pid-theory-explained.html

Rob S
Applications Engineer
National Instruments
Message 2 of 7
(3,856 Views)

@HeroOfHyrule wrote:

I don't know how the applied voltage would equal V in this case. It doesn't make sense to me. This article on PID control theory might help.

 

https://www.ni.com/en/shop/labview/pid-theory-explained.html


dear 

to be clear in my thread

 

if i applied step signal on the transfer function of dc motor {speed/input} in software (labview) to get the step response 

 

what will be the equivalent experiment in real world to get the same step response. ??

 

hi ?Q>

0 Kudos
Message 3 of 7
(3,846 Views)

@mangood wrote:

if i applied step signal on the transfer function of dc motor {speed/input} in software (labview) to get the step response 

 

what will be the equivalent experiment in real world to get the same step response. ??


It is still not clear what you are asking. I would expect speed to be an output of the system, and you would apply a step signal to the voltage to see how the speed responds, but you wrote "{speed/input}".

 

If you want the input of the transfer function to be a PWM duty cycle instead of a voltage, then the formula for the transfer function needs to include that conversion as well (from duty cycle to voltage). I can't tell you what that equation should be. If you only want to know what the shape of the response will be to a step input, without precisely modeling the time and amplitude, then it doesn't really matter what the input units are.

Message 4 of 7
(3,822 Views)

@nathand wrote:

@mangood wrote:

if I applied step signal on the transfer function of dc motor {speed/input} in software (labview) to get the step response 

 

what will be the equivalent experiment in real world to get the same step response. ??


It is still not clear what you are asking. I would expect speed to be an output of the system, and you would apply a step signal to the voltage to see how the speed responds, but you wrote "{speed/input}".

 

If you want the input of the transfer function to be a PWM duty cycle instead of a voltage, then the formula for the transfer function needs to include that conversion as well (from duty cycle to voltage). I can't tell you what that equation should be. If you only want to know what the shape of the response will be to a step input, without precisely modeling the time and amplitude, then it doesn't really matter what the input units are.


Dear nathand 

thank for replay 

 

for 

""It is still not clear what you are asking. I would expect speed to be an output of the system, and you would apply a step signal to the voltage to see how the speed responds, but you wrote "{speed/input}".

 

i think my ask is simple but I am bad in English so its hard to describe what I want

I will re ask again with simple description:

 

if I have a dc motor with its model [speed/input voltage=transfer function=1/s+1 ] and I apply a step response to such model in labview

I will get graph like this  which is the step response

 

PID.png

 

So if I go to real motor what is the applied voltage or duty cycle to motor to get the same response above in figure ?? i mean is thier scaling !>.>??

 

 

For 

"" then the formula for the transfer function needs to include that conversion as well (from duty cycle to voltage). I can't tell you what that equation should be"""

why you cannot tell me?? Is their problem in such that??Smiley Surprised

 

hi ?Q>

0 Kudos
Message 5 of 7
(3,813 Views)

mangood wrote:

For 

"" then the formula for the transfer function needs to include that conversion as well (from duty cycle to voltage). I can't tell you what that equation should be"""

why you cannot tell me?? Is their problem in such that??Smiley Surprised


I don't know what the transfer function should be. I don't know how you're generating the PWM signal, and I don't know if changing the duty cycle has a linear correlation with motor voltage, or some other relationship. Even if I had all that information, I couldn't give you the transfer function, because I'm not that good with the theoretical side of controls nor Laplace transforms.

 

Your graph shows a full system with a PID controller, but your equation describes only the transfer function of the motor. To duplicate the graph, you need a PID controller in addition to the motor, and it needs to be tuned to match the one used in simulation. Then you could make a step change in the setpoint, and the shape of the speed response would be similar to the graph. Of course there will be differences in scaling between the model and the real system - your graph has no units. If you have good measurements of your real motor, then you can include that information in your transfer function model so that the units will match.

Message 6 of 7
(3,793 Views)

@nathand wrote:

mangood wrote:

For 

"" then the formula for the transfer function needs to include that conversion as well (from duty cycle to voltage). I can't tell you what that equation should be"""

why you cannot tell me?? Is their problem in such that??Smiley Surprised


I don't know what the transfer function should be. I don't know how you're generating the PWM signal, and I don't know if changing the duty cycle has a linear correlation with motor voltage, or some other relationship. Even if I had all that information, I couldn't give you the transfer function, because I'm not that good with the theoretical side of controls nor Laplace transforms.

 

Your graph shows a full system with a PID controller, but your equation describes only the transfer function of the motor. To duplicate the graph, you need a PID controller in addition to the motor, and it needs to be tuned to match the one used in simulation. Then you could make a step change in the setpoint, and the shape of the speed response would be similar to the graph. Of course there will be differences in scaling between the model and the real system - your graph has no units. If you have good measurements of your real motor, then you can include that information in your transfer function model so that the units will match.


Dear nathand

thank for your information
its clear now 

the designed a controller for DC motor based on its mathematical model its hard

its need several parameters such tachometer and potentiometer sensors,PWM modulation

we may ask from NI control team to add tutorial on this problem related to DC NI motor  

 

or any boday may guide us to such problem

best regards

 

 

 

 

hi ?Q>

0 Kudos
Message 7 of 7
(3,752 Views)