Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Scaling concern for dc motor PID speed control

Status
Not open for further replies.

crimsonmoon

Newbie level 1
Joined
Nov 14, 2004
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
11
pid control pic16

Hello, I'm doing a PID speed control for a DC motor, using a PIC 16 as the controller. To have a closed loop I'm using an optic sensor, and an dented wheel. Not quite a quadrature encoder, since I only have one signal.
I still haven't mounted up the system, but I want to have the software as tuned up as possible before running ir.
My concern is about scaling and units. If I measure speed by counting pulses with a timer, how does this number relates to R (input or desired speed) to generate the error signal? And after doing the PID calculations (I'm using a difference equation), how does that number thrown out relates to PWM duty cycle? Do I have to multiply/divide by something?
Just in case, I'm using 20 KHz PWM, 0.02 S sampling time, and 16-bit integer math for calculations.
 

crimsonmoon said:
Hello, I'm doing a PID speed control for a DC motor, using a PIC 16 as the controller. To have a closed loop I'm using an optic sensor, and an dented wheel. Not quite a quadrature encoder, since I only have one signal.
I still haven't mounted up the system, but I want to have the software as tuned up as possible before running ir.
My concern is about scaling and units. If I measure speed by counting pulses with a timer, how does this number relates to R (input or desired speed) to generate the error signal? And after doing the PID calculations (I'm using a difference equation), how does that number thrown out relates to PWM duty cycle? Do I have to multiply/divide by something?
Just in case, I'm using 20 KHz PWM, 0.02 S sampling time, and 16-bit integer math for calculations.

crimsonmoon, probably the following posts will help you...






Good luck
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top