The objective of this exercise is to develop the fixed-point equations that implement a PID controller. You are to implement the following control system (Figure 13.29):
Figure 13.29
The state estimator and actuator output hardware/software interfaces are given. Your PID software is given a signed 16-bit decimal fixed-point input, x(n), that represents the current state variable. Similarly, your PID software will calculate a signed 16-bit decimal fixed-point output u(n) that will be fed to the actuator interface. For both cases, the fixed-point resolution, ?, is 0.01 V. Assuming the digital controller is executed every 1 ms (1000 Hz), show the control equation to be executed in the periodic interrupt handler. In this process you will convert from floating to fixed-point numbers and convert from continuous to discrete time. No software is required; just show the equations. Explain how you would deal with overflow/underflow. You should assume some noise exists on the sensor input.