03.08.2013 Views

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

where<br />

Equation GFLIB_<strong>Control</strong>lerPIp_Eq1<br />

• e(t) - input error in the continuous time domain<br />

• u(t) - controller output in the continuous time domain<br />

• K P - proportional gain<br />

• K I - integral gain<br />

Equation GFLIB_<strong>Control</strong>lerPIp_Eq1 can be described using the Laplace trans<strong>for</strong>mation<br />

as follows:<br />

Equation GFLIB_<strong>Control</strong>lerPIp_Eq2<br />

The proportional part of equation GFLIB_<strong>Control</strong>lerPIp_Eq2 is trans<strong>for</strong>med into the<br />

discrete time domain simply as:<br />

Equation GFLIB_<strong>Control</strong>lerPIp_Eq3<br />

Trans<strong>for</strong>ming the integral part of equation GFLIB_<strong>Control</strong>lerPIp_Eq2 into a discrete time<br />

domain using the Bilinear method, also known as trapezoidal approximation, leads to the<br />

following equation:<br />

where T s [sec] is the sampling time.<br />

Equation GFLIB_<strong>Control</strong>lerPIp_Eq4<br />

In order to implement the discrete equation of the controller on the fixed point arithmetic<br />

plat<strong>for</strong>m, the maximal values (scales) of the input <strong>and</strong> output signals have to be known a<br />

priori. This is essential <strong>for</strong> correct casting of the physical signal values into fixed point<br />

values:<br />

• E MAX - maximal value of the controller input error signal<br />

• U MAX - maximal value of the controller output signal<br />

<strong>Embedded</strong> <strong>Software</strong> <strong>and</strong> <strong>Motor</strong> <strong>Control</strong> <strong>Libraries</strong> <strong>for</strong> <strong>PXR40xx</strong>, Rev. 1.0<br />

Chapter 4 API References<br />

Freescale Semiconductor, Inc. 273

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!