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.

Fixed point PI Controller

Status
Not open for further replies.

curious_mind

Full Member level 4
Joined
Apr 14, 2019
Messages
208
Helped
0
Reputation
0
Reaction score
2
Trophy points
18
Activity points
1,573
Looking for a practical implementation of fixed point PI controller using MCU. Simulation in laplace domain has fetched Kp=0.1 and Ki= 1.75 as results. My ADC 16 bit data input is 2's complement (Range -1.0 to +1.0). If I were to use Q15 format ( FOR ADC), how do I convert Ki value to this format?
 

As a first step, you'll identify the required number range for all variables in your controller, also determine if 16 bit length is sufficient for all variables, e.g. the integrator. Obviously some have to use integer bits in a fixed point representation, e.g. mentioned Ki.

Perform appropriate scaling in every operation, apply saturation logic where necessary.
 

Hi FvM
Particularly I was interested about converting Ki values to Q15 format. Should I choose Q32 instead?
 

My suggestion was to use a specific scaling for every variable. 16 bit length should be sufficient.

I'm not sure what you mean with Q32. If it's Q0_31 in full notation, it has neither the required integer bits.
 

Hi FvM

I am new to this stuff. Multiplying Ki by 32767 gives me value that is greater than 16 bits. Do you suggest mixing different Q formats for different variables? Taking my own requirement, could you suggest the scaling factors?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top