Embedded Control Systems in C/C++: An Introduction for Software Developers Using MATLAB

| 1. | The observer-controller developed in the Chapter 7 self-test is shown below. The states are x = [ ? x ![]() |
|
| 2. | Discretize the continuous-time model of problem 1 with a step time of 10 milliseconds and a first-order hold approximation. |
|
| 3. | Plot the unit step response and frequency response from input 1 (0) to the output ( F) of the discrete-time observer-controller and compare them to the responses of the continuous-time observer-controller. |
|
| 4. | Implement the observer-controller in C++ with floating-point mathematics. Use write_cpp_model() for this. |
|
| 5. | Use the scaling vectors u s = [4 2 1000], x s = [2 1 100 20], and y s = [1000], to implement the observer-controller in C++ with fixed-point mathematics. Use write_cpp_fixpt_model() for this. |
|
| 6. | Write a C++ program that iterates the floating-point and fixed-point models created in the previous two problems for 10 time steps (0.1 seconds) and stores the results in a text file that can be read by MATLAB. Use [1 0 0] T as the system input vector and set the initial states to zero. |
|
| 7. | Plot the outputs of the fixed-point and floating-point models from the previous exercise along with the response of the continuous-time model in MATLAB. |
|
| 8. |