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.

PID implementation for speed control

Status
Not open for further replies.

moro

Member level 3
Joined
Jul 12, 2009
Messages
65
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
2,013
Hello, i have a system which controls a 3 phase BLDC motor. The speed of the motor is read trough 3 hall sensors.

For controling the sistem, i have two timers with their own ISR/Interrupt handlers.

Timer1 ISR - i manage the dutycycle and the comutation of the motor phases, this ISR runs at a constant rate ( 40khz)

Timer2 ISR - runs everytime a change in the hall sensors state occurs, the rate can vary due to motor speed, in this ISR the actual rpm speed is calculated.


The PID has a reference input in rpm , and takes the feedback from the TIMER2 isr rpm calculation, depending on the error the dutycycle is adjusted for the next switching cycle so it will mantain the speed

Where its best to place the PID? in the ISR which has a constant "ticking" rate? Or in the same ISR where the speed is measured?
 

Assuming that the function of your PID controller is in the delay format H(z) for IIR filters, one would expect the sampling rate to be constant unless you are using some other algebra or method different of the classic z-transform to define the transfer function of the controller.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top